Python 3.8.8(default, Apr 132021,19:58:26)[GCC 7.3.0]:: Anaconda, Inc. on linux
Type "help","copyright","credits"or"license"for more information.>>> a =[1,2,3,4,5]>>>map(lambda x:x+10,a )<mapobject at 0x7fdc997bfc40>>>>list(map(lambda x:x+10,a))[11,12,13,14,15]>>>
方法二 [(lambad)(x) for x in list]
Python 3.8.8(default, Apr 132021,19:58:26)[GCC 7.3.0]:: Anaconda, Inc. on linux
Type "help","copyright","credits"or"license"for more information.>>> a =[1,2,3,4,5]>>>[(lambda x:x+10)(y)for y in a][11,12,13,14,15]