Taking ([0,1,2,3,4,5]) as an example
Can someone please explain to me how the part of the circulated code (in red ) below:
evaluates to 2.
Properly speaking wouldn’t it evaluate as follows;
= lst.index(len(lst)/ 1)
which would give you the whole list and not the 2nd portion of it.
Shouldn’t the right code be lst.index((len(lst)/2) -1)