1.每个缩进层级使用4个空格

while True:
    pass

2.每行最多79个字符

AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA

### 3.顶层函数或类的定义之间空两行
def MySum():
    pass


def MyName():
    pass

4.采用UTF-8编码文件(通用编码格式)

# coding=utf-8 或
# -*- coding: utf-8 -*-

### 5.每行只使用import导入一个模块(分组标准库、三方库和本地库)
import math
import os

6.在小括号、中括号、大括号之间或者逗号之前没有额外的空格

print("{1}{2}{3}".format(1,2,3))

相关文章:

  • 2022-02-13
  • 2022-02-18
  • 2021-09-27
  • 2021-10-22
  • 2021-10-13
  • 2022-12-23
猜你喜欢
  • 2022-01-17
  • 2022-12-23
  • 2022-01-18
  • 2022-01-07
  • 2021-09-17
  • 2022-02-08
  • 2021-12-22
相关资源
相似解决方案