Unify the comment style of python codes

This commit is contained in:
krahets
2023-04-09 05:30:02 +08:00
parent 5ddcb60825
commit 10e2180013
53 changed files with 109 additions and 106 deletions

View File

@ -75,14 +75,14 @@
=== "Python"
```python title=""
""" 类 """
class Node:
"""类"""
def __init__(self, x: int):
self.val: int = x # 节点值
self.next: Optional[Node] = None # 指向下一节点的指针(引用)
""" 函数 """
def function() -> int:
"""函数"""
# do something...
return 0
@ -413,13 +413,13 @@
# do something
return 0
""" 循环 O(1) """
def loop(n: int) -> None:
"""循环 O(1)"""
for _ in range(n):
function()
""" 递归 O(n) """
def recur(n: int) -> int:
"""递归 O(n)"""
if n == 1: return
return recur(n - 1)
```