python 高级编程_Python 高级编程
Python高级编程生成式(推导式)用于创建list的生成式1 >>> list(range(1,11))23 [1,2,3,4,5,6,7,8,9,10]常见用法1 >>> [x * x for x in range(1,11)]23 [1, 4, 9, 16, 25, 36, 49, 64, 81, 100]写列表生成式时,把要生成的元素 x * x 放到前面,后面跟 for ...