issue with python lambda function in list comprehension

前端 未结 0 848
慢半拍i
慢半拍i 2021-01-13 17:05

I am trying to make a python list of anonymous functions as such:

funcs = [lambda x: x+i for i in range(3)]

this should have the same effect

相关标签:
回答
  • 消灭零回复
提交回复
热议问题