1 #!/usr/bin/env python 2 ret = map(lambda x : x+100 if x % 2 == 1 else x - 100, [1,2,3,4,5]) 3 print(ret) 4 for i in ret : 5 print(i)
时间: 2024-10-03 13:38:44
1 #!/usr/bin/env python 2 ret = map(lambda x : x+100 if x % 2 == 1 else x - 100, [1,2,3,4,5]) 3 print(ret) 4 for i in ret : 5 print(i)