📅  最后修改于: 2022-03-11 14:45:23.710000             🧑  作者: Mango
代码示例1
def main():
d = {}
for x in [1,2]:
d[x] = lambda x=x: print(x)
d[1]()
d[2]()
if __name__ == '__main__':
main()
>>>
1
2