Python知识点整理
2016-11-17 10:45
597 查看
参考
Python.Doc;
廖雪峰的Python教程
‘\’ 后不能接注释,不能用于拆分字符串
保留的标识符类型(Reserved classes of identifiers)
_*
*
__*
//
%
Python.Doc;
廖雪峰的Python教程
显示连接(Explicit line joining)
使用 ‘\’将两行代码为一行:if 1900 < year < 2100 and 1 <= month <= 12 \ and 1 <= day <= 31 and 0 <= hour < 24 \ and 0 <= minute < 60 and 0 <= second < 60: # Looks ike a valid date return 1
‘\’ 后不能接注释,不能用于拆分字符串
隐式连接(Implicit line joining)
()、[]、{}内的内容可以被切割成多个行,可以添加注释,month_names = ['Januari', 'Februari', 'Maart', # These are the 'April', 'Mei', 'Juni', # Dutch names 'Juli', 'Augustus', 'September', # for the months 'Oktober', 'November', 'December'] # of the year
关键字(Keywords)
False class finally is return None continue for lambda try True def from nonlocal while and del global not with as elif if or yield assert else import pass break except in raise
保留的标识符类型(Reserved classes of identifiers)
_*
*
__*
除法
/>>> 10 / 3 3.3333333333333335 >>> 9 / 3 3.0
//
>>> 10 // 3 3
%
>>> 10 % 3 1
相关文章推荐
- 归纳整理Python中的控制流语句的知识点
- python文件操作相关知识点总结整理
- Python--matplotlib绘图可视化知识点整理
- Python--matplotlib绘图可视化知识点整理
- Python知识点整理
- python 面试题 - 知识点整理
- Python关键知识点整理(一)
- Python--matplotlib绘图可视化知识点整理
- Python 面试题 - 知识点整理
- Python--matplotlib绘图可视化知识点整理
- python文件操作相关知识点总结整理
- Python知识点整理(基础篇)
- Python知识点整理(函数篇)
- Python整理小知识点
- Python--matplotlib绘图可视化知识点整理
- 在Python中处理日期和时间的基本知识点整理汇总
- Python--matplotlib绘图可视化知识点整理
- Python--matplotlib绘图可视化知识点整理
- Python--matplotlib绘图可视化知识点整理
- Python--matplotlib绘图可视化知识点整理