I've decided not to waste my summer and start learning python. I figured I'd start learning looping techniques so I wanted to start with a basic list of numbers, aka, write a for loop that will generate the numbers 1 - 10.
This is what I have:
def generateNumber(num):
i=0
for i in range(num):
return i
return i
and the code doesn't work. I want to get an output in a list like this:
>>> generateNumber(10)
[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]