常量与Pylint的规范

constant 常量

python里其实是没有常量的,因为它没有一种机制是阻止你修改某个值的 约定用大写字母表示常量

'''
这是模块的说明,放在文件的开头
'''
# python里的常量并不是真正意义上的常量
ACCOUNT = "scott"
PASSWORD = "123"
# 一个标准的python代码是由很多模块构成

username = input("please input your username:")
password = input("please input your password:")

results matching ""

    No results matching ""