Increase numbers in python until max
I want to have python spit out a bunch of numbers for me. example:
>>>date = 1940
>>>da开发者_StackOverflowte += 1
>>>print str(date)
1941
>>>
but i want to loop that and output all numbers from 1940-2004
Use the range
function.
for i in range(1940,2005):
print i
精彩评论