Interesting Python questions

See if you are able to answer these python questions:

[code lang=”python”]
lams = []
for i in range(10):
lams.append(lambda:i)
print [f() for f in lams]
[/code]

Leave a Reply

Your email address will not be published.