Hi all,
I tried to write in a fibonacci sequence using python:
unum = int(raw_input('Enter Limit Number to run Fibonacci sequence: '))
numlist = [1,1]
for i in range(unum):
fib2 = numlist[i+1] + numlist[i]
numlist.append(fib2)
print "Here's Fibonacci!"
for w in numlist:
print w,
This works fine. But is there a way to print out the sequence without having to store the first two numbers in the 'numlist' ? i.e generate them within the loop?
-ymf