Omitting indices


#1



Can anyone explain me the meaning of this code
print to_five[::2]


Replace this line with your code.


#2

its list slicing, it has 3 values:

[start:stop:stride]

so in your case, the start value is the default (0) and stop value of list length, and steps of 2


#3

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