Variables defined rules

Variable names can be any combination of letters, numbers or underscore

The first character variable names can not be digital

The following keywords can not be declared variable name

['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']

And built-in Python it is best not to repeat things such as: sum method

 Hump ​​body

 

Guess you like

Origin www.cnblogs.com/zhang-da/p/10930129.html