Here is my code to generate values in the fibonnacci sequence below 10,000,000.
3 fibs = [1,1] 4 while((x = fibs[-1] + fibs[-2]) <= 10000000): 5
The reason for not allowing assignment in Python expressions is a common, hard-to-find bug in those other languages, caused by this construct.
Please check http://effbot.org/pyfaq/why-can-t-i-use-an-assignment-in-an-expression.htm