x = 1 def one (): "This is perfectly fine." y = x return y def two (): "This too!" x = 2 return x def three (): "Python creates a new local x, and assigns it x+2, but x has no value yet." x = x + 2 return x print one () print two () print three ()