标签:color lambda class pytho blog else bin for code
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)
map的使用(自增)ret = map(lambda x : x+100 if x % 2 == 1 else x - 100, [1,2,3,4,5])
标签:color lambda class pytho blog else bin for code
原文地址:http://www.cnblogs.com/shiluoliming/p/6215662.html