7/18 List Slicing Syntax Question


#1

for the list slice below, if the 9 in [2:9:2] is exclusive as the lesson states, shouldnt the printed list only go up to 49 (7 **2)?


#2

lists are zero index based. so:

1   4   9   16   25   36   49   64   81   100
0   1   2   3    4    5    6    7    8    9

i put the indexes under the values of the list, 81 is positioned at index 8.


#3

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.