上次内容回顾:
python执行方式
- 解释器交互式执行
- 文件执行
- python xxx.py
指定解释器
- ./xxx.py #!/usr/bin/env python
常用编码种类
ascii unicode utf-8
python2.7 默认为ascii编码
#-*- coding:utf-8 -*-
python3.0默认为utf-8编码
1、变量:代指功能 代指的内存地址
- 数字字母下划线
- 数字不能开头
- 不能喝py的关键字重复
2、条件语句
- if
- elif
- else
3、while循环
while 条件:
语句1
语句2