mirror of
https://github.com/krahets/hello-algo.git
synced 2026-04-02 02:02:57 +08:00
Add typing annotations to Python codes. (#411)
This commit is contained in:
@@ -34,8 +34,8 @@
|
||||
|
||||
```python title="array.py"
|
||||
""" 初始化数组 """
|
||||
arr = [0] * 5 # [ 0, 0, 0, 0, 0 ]
|
||||
nums = [1, 3, 2, 5, 4]
|
||||
arr: List[int] = [0] * 5 # [ 0, 0, 0, 0, 0 ]
|
||||
nums: List[int] = [1, 3, 2, 5, 4]
|
||||
```
|
||||
|
||||
=== "Go"
|
||||
|
||||
Reference in New Issue
Block a user