python如何快速的向数组增加整型元素

比如,python写这样的程序:
lu=[]
for i in range(13000,1,-1):
lu.append(i)
这样增加要花费很长时间,如何优化可以将时间缩小到几秒内?谢谢大神们!

直接

lu.extend([i for i in range(13000,1,-1)])

温馨提示:答案为网友推荐,仅供参考
相似回答