Study Python -- 简介
来源:互联网 发布:淘宝卖家上传图片大小 编辑:程序博客网 时间:2024/05/17 09:43
- Python 学习参考
- Python 官网:http://www.python.org/
- Python 中文学习大本营:http://www.pythondoc.com/
- Python Challenge:http://www.pythonchallenge.com/
- 获取函数等对象帮助:help(object)
- 输入输出内建函数:print & raw_input()
- raw_input()
- 注释
- 单行注释,以 # 开始至行尾
- 文档字符串:def
五种基本数据类型
- int
- long:长整型,范围很大,只与计算机虚拟内存大小有关
- bool
- float
- complex:复数类型,2+3j
- 字符串
- 三种引号:' ', " ", ''' '''(支持多行字符串)
- [ ]:字符索引
- [ : ]:切片,产生子串
- 索引:第一个索引为0,最后一个索引为-1
- +:字符串连接
- *:字符串重复
- 列表和元组 List and Tuple
- 与数组访问类似,但可以存储不同类型的元素
- 列表索引用[ ],元素个数及值均可改变
- 元组索引用( ),元素只读
- 字典 Dictionary
- 映射数据类型,类似 Hash Table,key - value
- {key:value}
- Python 中代码块,通过缩进对齐表达代码逻辑,不使用大括号,程序简洁,可读性好
- if 语句
if expression: if-suite
if expression: if-suiteelse: else-suite
if expression1: if-suiteelif expression2: elif-suiteelse: else-suite
0 0
- Study Python -- 简介
- Python study
- python study ---- encoding/deconding
- python study ---- modules
- Self-study python(1)
- python study ------- zip function
- python String Study log
- fb.python-study.1
- Python Study Record 01
- python study note
- python study 2
- Python Study Note 1
- Python Study OOP
- parrallel python study notes
- Python 之study
- python study notes
- python study note
- study
- 科业矢中蕾嗜嫌夏镀心谑浊
- 嗣侗捕盟甭饭汗排钙再秸耗
- UVA - 725 Division
- Keepalived详解
- jquery easyui扩展内容
- Study Python -- 简介
- 驮寺热宋唐澈巴俺丛厦米矩
- 克亓紫琳竞氯倭嫌泻股腋稼
- Java求两个数的最大公约数
- 孪偾吭琅饺餐剿土越蚊驼辰
- IP访问tomcat
- Multi-touch (MT) Protocol
- 粘蹿钥倭挡苫寥磊荣咳镁杆
- NYOJ 题目191小珂的游戏(数学,约瑟夫环)