What do you think would be the output of this simple python code snippet
Will post the answer and its explanation in a while.
i=333
def test():
print "Global i =", i
for i in range(10):
print "Local i = ",i
test()
knowledgezenforyou@gmail.com Assorted posts about Software design, development and debugging, algorithms and data structures, programming languages(C,C++,Python,Matlab,Javascript,...), programming puzzles,brain teasers and other technical stuff we find interesting.
i=333
def test():
print "Global i =", i
for i in range(10):
print "Local i = ",i
test()
No comments:
Post a Comment