标签:ima 图片 python pytho 9.png 就是 bubuko .com 过程
a = [x for x in range(4)] # 可以看做 a = [] for x in range(4): a.append(x)
a = [x for x in range(3, 10) if x % 2 == 0] # 可以看做 a = [] for x in range(3, 10): if x % 2 == 0: a.append(x)
a = [(x, y) for x in range(1, 3) for y in range(3)] # 可以看做 a = [] for x in range(1, 3): for y in range(3): a.append((x, y))
a = [(x, y) for x in range(1, 3) for y in range(3) for z in range(4, 6)] # 可以看做 a = [] for x in range(1, 3): for y in range(3): for z in range(4, 6): a.append((x, y, z))
标签:ima 图片 python pytho 9.png 就是 bubuko .com 过程
原文地址:https://www.cnblogs.com/huafeishi/p/9310789.html