This commit is contained in:
krahets
2023-03-23 18:56:56 +08:00
parent 2715ce703a
commit 0dfdcf0bab
25 changed files with 118 additions and 115 deletions

View File

@@ -632,7 +632,7 @@ comments: true
=== "Python"
```python title="linked_list.py"
def access(head: ListNode, index: int) -> Optional[ListNode]:
def access(head: ListNode, index: int) -> ListNode | None:
""" 访问链表中索引为 index 的结点 """
for _ in range(index):
if not head: