
python
温酒敬年华
这个作者很懒,什么都没留下…
展开
-
Python错误之 IndentationError: unindent does not match any outer indentation level
Python错误之 IndentationError: unindent does not match any outer indentation level.BUG-介绍.BUG-举例.BUG-解决.小技巧延伸1.BUG-介绍 BUG: IndentationError: unindent does not match any outer indentatio...原创 2018-03-01 14:38:13 · 932 阅读 · 0 评论 -
python笔记-模块发布及安装
python笔记-模块发布及安装1.模块的准备要发布自己写好的模块,那么之前自己一定是有自己所构建的包(这是必须的)包的目录结构如下(实验用的包名为test):2.在包所在目录新建文件setup.py编辑内容:from distutils.core import setupsetup(name="模块名称", version="版本", desc...原创 2018-02-08 15:02:07 · 269 阅读 · 0 评论 -
ubuntu16.04升级python2.7x版本到python3.5版本
参考:https://www.cnblogs.com/wmr95/p/7637077.html一般情况下ubuntu16.04都会自动安装python2.7的版本,在此尝试将其升级为python3.5版本一:打开ubuntu的终端在命令行输入命令:python显示如下,说明系统自带的python版本为python2.7.12 二:在命令行输入命令:sudo apt-get原创 2018-01-05 11:04:35 · 10178 阅读 · 7 评论 -
误区:在遍历列表时删除元素时可能存在漏删
误区:在遍历列表时删除元素时可能存在漏删 1:举例 2:误区原因 3:解决方案 1:举例 在遍历列表时删除元素时可能存在漏删 如下: In [1]: a = [1,2,3,4,5,6] In [2]: for i in a: …: if i==3 or i==4: …: a.remove...原创 2018-05-20 18:10:21 · 410 阅读 · 0 评论