>>> x = 3 >>> def y(): print x ... >>> y() 3