11 Practice


so, my code works, but I was forced to write [7:14] for the middle_third list. I dont understand this. Wasn't the starting point inclusive and the final exclusive? I'm a bit confused

to_21 = range(1,22)
print to_21
odds = to_21[::2]
print odds

middle_third = to_21[7:14]
print middle_third


Because you started at 1 instead of 0.


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