
Python
calmXia
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
Python -- 002 基础 -- list
文章目录删除判断list是否为空删除list.pop() 等价于 list.pop(-1) # 删除最后一个元素list.pop(index) # 删除指定位置的元素判断list是否为空if list == None: # code block1else: # code block2...原创 2019-04-04 10:11:56 · 167 阅读 · 0 评论 -
Python fantastic syntax which is different from C/C++/Java
@[toc] Fantastic syntax which is different from C/C++/Java return A if express else B如果 express 成立,则返回 A,否则返回 B原创 2019-04-04 16:58:28 · 183 阅读 · 0 评论 -
Python -- set(集合)
set – 判断是否为空 states_needed = set(["mt", "wa", "or", "id", "nv", "ut", "ca", "az"]) # 传入的数组被转换为集合 while states_needed: # OK # while len(states_needed) > 0: # OK # while len(states_n...原创 2019-04-12 09:27:53 · 543 阅读 · 0 评论 -
Python [ site-Package ] [ xlwt ] [ ValueError: cannot use LOCALE flag with a str pattern ]
python3.7 读写execl时报错:Traceback (most recent call last):File “parse-excel.py”, line 4, in import xlwt,xlrd,sysFile “C:\Python37\lib\site-packages\xlwt_init_.py”, line 4, in from .Worksheet import ...原创 2019-04-09 12:37:37 · 5904 阅读 · 1 评论 -
Python 类和方法
自定义方法时,自定义的方法调用当前类中另外个自定义方法,被调用的方法前面需要添加self.前缀,否则会报错:“NameError: name ‘get_index_by_title’ is not defined”...原创 2019-04-15 22:01:10 · 468 阅读 · 0 评论 -
Python [Doc] [Python 3.7.3 文档]
Python 3.7.3 文档 中文版https://docs.python.org/zh-cn/3/原创 2019-04-09 18:38:26 · 864 阅读 · 0 评论 -
Python Script ADB
ConfigurationWindows OS 下实现鼠标双击 .py 文件即可执行一般情况下,如果安装 python 的时候如果设置了系统环境变量,那么就默认 .py 文件支持了双击直接运行。如果不行,可以按以下方式修改:右键选中需要设置的 .py 文件,设置“属性”,将“打开方式”更改为 python 安装目录下的 python.exe(右键—属性—常规—打开方式)Exampl...原创 2019-06-17 15:55:05 · 170 阅读 · 0 评论 -
Python 008 面向对象高级编程
文章目录Issues 1. 使用 @proterty 描述的方法在调用时切忌不能带括号() 1.1 TypeError: 'int' object is not callableIssues 1. 使用 @proterty 描述的方法在调用时切忌不能带括号() 1.1 TypeError: ‘int’ object is not callableclass ArrayStack(obj...原创 2019-07-01 15:36:27 · 155 阅读 · 0 评论