Omitting indices


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

Replace this line with your code.


its list slicing, it has 3 values:


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


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