对象:ID、Type、Value
变量
保留字
and elif import raise global
as else in return nonlocal
assert expect is try True
break finally lamba while False
class for not with None
continue from or yield
def if pass del
2)数据类型:
Numbers-------数字
Strings-------字符串 +链接 *复制
List----------列表
Tuples--------元组
Dictionaries--字典
Sets----------集合
数字
Integers----------------整型
Boolleans---------------布尔型
Floating point numbers--浮点型
Complex numbers---------复数
3)类型转换
int()
bin()
4)语句
赋值语句--变量名=变量值
|--顺序结构
结构化语句--|--分支(选择)结构 if:(条件) 语句块 elif:(条件) 语句块
|--循环结构 for 变量 in range()/字符串/列表
while 条件: 语句块
else: 语句块
break:终止循环 跳出
continue:终止循环 继续
5)函数
变量名-- input(“提示字符串”) 其他类型需要转换
评估函数--eval (“字符串或字符串变量”)去掉参数最外侧引号并执行余下语句的函数
print()格式化
print()
格式:print (value,...,sep='',end='\n',file=sys.stdout,flush=False)