【Python基础】03_Python中的命名和关键字

1.Python中的关键字:

['False', 'None', 'True', 'and', 'as', 'assert', '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']

2.Python命名规则:

参考Python 风格指南 :

https://zh-google-styleguide.readthedocs.io/en/latest/google-python-styleguide/contents/

  • 每个单词都使用小写字母
  • Python标识符区分大小写
  • 单词与单词之间使用_下划线连接
原文地址:https://www.cnblogs.com/dujinyang/p/11257366.html