+ 1
what is the default value of start and end argument if step is negative in slice notation ?
lst=[1,2,3,4,5] print(lst[::-1] #[start : end : step] #output : [5,4,3,2,1] here, step is -1 right ? then what is the default of start and end ?
1 Answer
+ 1
đżBAD BOY!
you mean
lst[::-1] is same as lst[1:5:-1] ?
if yes then output is empty sir [ ]