立即学习:https://edu.csdn.net/course/play/24459/296350?utm_source=blogtoedu
列表生成式
普通青年:
a = [1,2,3,4,5]
for index,i in enumerate(a):
a[index] += 1
略屌青年:
a = list(map(lambda x:x+1,a))
列表生成式:
a = [ i+1 for i in a ]
立即学习:https://edu.csdn.net/course/play/24459/296350?utm_source=blogtoedu
列表生成式
普通青年:
a = [1,2,3,4,5]
for index,i in enumerate(a):
a[index] += 1
略屌青年:
a = list(map(lambda x:x+1,a))
列表生成式:
a = [ i+1 for i in a ]