- Python中变量名必须以以字母,数字,和下划线组成。变量名的第一个字符不能是数字。
- 以下关键字不能声明为变量名:
- ‘and’,'as','assert','break','class','continue','def','del','elif','else','except','exec','finally','for','from','global','if','import','in','is','lambda','not','or','pass','print','raise','return','try','while','with','yield'
- Python中单行注释用‘#’表示,多行注释用三个引号""" (成对的)
- Python文件名最好以.py结尾。
- Python2中用 '# -*- coding: utf8 -*-' 做为字符编码
- Python中 '#! /usr/bin/env python' 为解释器路径