python变量

什么是变量?

变量就是将一些运算的结果暂存在内存中,以便后续代码调用。

1、必须是数字,字母、下划线任意组合,且不能数字开头。

2、不是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']

3、变量具有可描述性

4、不能是中文。

 

posted @ 2020-05-18 16:21  烟斗和沙漏  阅读(114)  评论(0编辑  收藏  举报