要生成[1,4,9,16,25]怎么办?
[x*x for x in range(1,6)]
[x * x for x in range(1, 11) if x % 2 == 0]
[4, 16, 36, 64, 100]
L=['Hello','Mool','Wdddd']#大写变成小写
[s.lower() for s in L]
isinstance(1,str)#判断是不是字符串
要生成[1,4,9,16,25]怎么办?
[x*x for x in range(1,6)]
[x * x for x in range(1, 11) if x % 2 == 0]
[4, 16, 36, 64, 100]
L=['Hello','Mool','Wdddd']#大写变成小写
[s.lower() for s in L]
isinstance(1,str)#判断是不是字符串