Created
July 14, 2014 15:46
-
-
Save gnuvince/dc45daf97d3de3eef227 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def g(x): | |
return x*x | |
def f(x): | |
global f | |
if x == 5: | |
f = g | |
return x | |
print [f(x) for x in xrange(10)] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment