n = 1000 first = 0.0 second = 1.0 print "%s %s " % (first, second), while n != 0: third = first + second first = second second = third print "%s " % third, n -= 1