8. Omitting Indices


I am not stuck at this exercise but curious on the following. in idle 3.5.2 if I type in:
print (x)
I get range(1,11)
rather than:

is this only due to version difference or am I missing something?

Replace this line with your code.


It's definitely a version difference between python 2.x and 3.x. In python 3.x, range() went from creating a list to creating a generator.
Just add list(range(1,11) for python 3.x.

EDIT: Added more details.


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