top of page
Search

PYTHON CODING

  • Writer: waclaw_koscielniak
    waclaw_koscielniak
  • Aug 4
  • 1 min read

def make_funcs():

return [lambda x: i * x for i in range(3)]

funcs = make_funcs()

results = [f(2) for f in funcs]

print(results)


[Running] python3 -u "/Users/name/test/test82.py"

[4, 4, 4]

[Done] exited with code=0 in 0.052 seconds

Try to run it to verify.
Try to run it to verify.
















 
 
 

1 Comment


Guest
Aug 04

Did you try to run it?

Like
bottom of page