变量的命名
1.只能是一个词;
2.只能包含字母、数字和下划线;
3.不能以数字开头;
4.尽量描述包含的数据内容;
5.不要使用python函数名和关键字。
>>>number = 34
>>>name = 'forchange'
>>>list_class = ['基础语法课程','爬虫分析初阶','爬虫分析进阶','自动化办公']
#以上number,name,list_class都是是变量名
python3.7.4中的关键字(不用记,熟悉即可) |
||||||
False |
None |
True |
and |
as |
assert |
async |
await |
break |
class |
continue |
def |
del |
elif |
else |
except |
finally |
for |
from |
global |
if |
import |
in |
is |
lambda |
nonlocal |
not |
or |
pass |
raise |
return |
try |
while |
with |
yield |