基本数据类型
整形,浮点型 布尔型 字符型:单引号,双引号和三引号,三引号可以保留字符串的格式如换行
基本数据处理
- 变量赋值
m=n=10;a,b,c=80,60,20; - 输入输出
print格式化输出  input输入的永远是字符串,需要通过int 或float函数进行类型转换 - 运算符和表达式
**乘方 逻辑运算符and\or\not 按位运算符~,|,&等,注~x+x=-1
复合数据类型
- 列表
-
列表的索引    -
列表元素的增加  -
列表元素的删除  -
列表的其他方法 
- 元组
元组与列表的区别是元组内数据不可变,于是元组只有两种可用的方法是count和index - 字典
 - 集合
无序,不重复  集合的并,交,差,对称差  - 序列上的操作
属于序列的数据类型:string,list,tuple 操作字符串的函数:len,count找出子字符串出现的次数,eval,find从字符串中查找子字符串所在的位置  - 序列操作函数
map函数  reduce函数  
filter函数:过滤器  将iterable中的元素代入function后可以返回true的元素将被保留 7. 列表推导式 一个中括号里面包含一个for语句对一个可迭代对象进行迭代 列表推导式的作用 过滤列表中不符合条件的元素  
函数
- 匿名函数,lambda函数
接收任意多个参数并返回单个表达式值,只可以包含一个表达式 - 自定义函数的四种参数
- 默认参数
- 位置参数
- 可变参数*args,多个参数会被组装成tuple
- 关键字参数:既可以接受多个实参,又可以把多个实参指定各自的实参名**kw,多个参数会被组装成dict
- 参数定义的顺序必须是:位置,默认,可变,关键字
- 参数传递
python自动将不可变对象(数值,字符串)按值传递,将可变对象(列表)按地址传递 参数传递的复合数据解包  
模块
注意查询时若不加引号需要先导入,加引号不需要导入可直接查询 查询库的所有模块 help(“numpy”) 查询模块中所有函数 dir(“numpy.random”) 查询函数的使用 help("numpy.random.randint)
自定义模块
将多个函数搜集在一个脚本文件中 
python程序的书写规则
缩进,冒号和空行 单行注释:#开头 多行注释:’’’…’’'或"""…""" 
|