python 基础

python命名规则

2018-06-25  本文已影响11人  ddm2014

命名规范:
根据(https://www.cnblogs.com/Maker-Liu/p/5528213.html)整理

image.png

空格使用:
根据(https://blog.csdn.net/warm77/article/details/78353632)整理
1.在二元运算符两边各空一格[=,-,+=,==,>,in,is not, and]
除了在参数列表中

submitted += 1
def complex(real, imag=5):
    pass

2.函数的参数列表中,,之后要有空格

def complex(real, imag=5):
    pass
上一篇 下一篇

猜你喜欢

热点阅读