SHARE
TWEET

Lambda Example

a guest Jan 4th, 2013 86 Never
  1. funcs = []
  2. for s in ["hello","world"]:
  3.     func = lambda x: print(s)
  4.     funcs.append(func)
  5. funcs[0](None)
  6. funcs[1](None)
RAW Paste Data
Top