Help with the Range function

I’m trying to solve this question:

Modify list1 so that it is a range containing numbers starting at 0 and up to, but not including, 9.

Here is what I wrote:

list1 = range(0, 9)

Not sure why this isn’t working

Is this in Python2 or 3? In Python3 range returns a range object. If you wanted a list you’d need to change it to one, e.g. with list().

1 Like

@tgrtim - I’m not sure, below is a link to the exercise.

@tgrtim - That ended up working thank you!

1 Like