大家好,又见面了,我是你们的朋友全栈君。
Python 变量命名规则
python 是动态编译语言,不用事先声明类型,赋值即声明。
1....&)等
3.不能是中文
4.不能以数字开头
5.保留字符是不能被使用,如下:
[‘and’, ‘as’, ‘assert’, ‘break’, ‘class’, ‘continue’, ‘def’, ‘...lambda’, ‘not’, ‘or’, ‘pass’, ‘print’, ‘raise’, ‘return’, ‘try’, ‘while’, ‘with’, ‘yield’]
6.变量区分大小写
常用的命名方法