mirror of
https://github.com/krahets/hello-algo.git
synced 2026-04-23 18:11:45 +08:00
build
This commit is contained in:
@@ -39,9 +39,9 @@ comments: true
|
||||
```python title="list.py"
|
||||
# 初始化列表
|
||||
# 无初始值
|
||||
list1: List[int] = []
|
||||
list1: list[int] = []
|
||||
# 有初始值
|
||||
list: List[int] = [1, 3, 2, 5, 4]
|
||||
list: list[int] = [1, 3, 2, 5, 4]
|
||||
```
|
||||
|
||||
=== "Go"
|
||||
@@ -650,7 +650,7 @@ comments: true
|
||||
|
||||
```python title="list.py"
|
||||
# 拼接两个列表
|
||||
list1: List[int] = [6, 8, 7, 10, 9]
|
||||
list1: list[int] = [6, 8, 7, 10, 9]
|
||||
list += list1 # 将列表 list1 拼接到 list 之后
|
||||
```
|
||||
|
||||
|
||||
Reference in New Issue
Block a user