LIMIT = 50000 # Initialize the first two Fibonacci numbers a, b = 0, 1 # Print the starting number 0, since it is less than the limit print(a) # Use a while loop to generate and print the sequence while b < LIMIT: print(b) # Update the values for the next iteration # The new 'a' becomes the old 'b', and the new 'b' is their sum a, b = b, a + b