mirror of
https://github.com/krahets/hello-algo.git
synced 2026-04-13 18:00:18 +08:00
build
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user