why in 1 evaluation ques , this code is wrong?primes[-1:-5]
we have used sorted(marks,reverse=True)why can't we use marks.sort(reverse=True) to perform changes in marks itself ?
week_name=["mon","tue","wed","thu","fri","sat","sun"]why does week_name[-1:-5] returns [ ]
13364 visits
Outline:Various manipulation in lists Slicing of lists Syntax and demonstration of slicing of lists How to use step value in slicing Striding of list Examples with various parameters in striding of list sort method in list Usage of sorted() built-in function Reverse a list Striding with negative values How to store a new reversed list in another variable
Various manipulation in lists Slicing of lists Syntax and demonstration of slicing of lists How to use step value in slicing Striding of list Examples with various parameters in striding of list sort method in list Usage of sorted() built-in function Reverse a list Striding with negative values How to store a new reversed list in another variable
Show video info
Pre-requisite