摘要:
List是python中比较常用的数据类型,一般向list添加元素有如下四种方法(append,extend,insert,+),自己写了个简单方法,向一个空的list添加3千万个相同元素,比较了下这四种方法的效率: import timedef append(n): a=[] for i in r 阅读全文
摘要:
在centos中用yum安装sysstat时报错 /usr/bin/yum: /usr/bin/Python: bad interpreter: No such file or directory 先进入目录/usr/bin中查看python命令,我的为python2.6,记住后面的数字(系统安装p 阅读全文