1
0
mirror of https://github.com/adambard/learnxinyminutes-docs.git synced 2025-08-06 23:06:49 +02:00

Merge pull request #3919 from but0n/fix-pythonlegacy-cn

[python/zh-cn] Fix a translation mistake
This commit is contained in:
Max Schumacher
2020-08-17 16:12:35 +02:00
committed by GitHub

View File

@@ -163,7 +163,7 @@ li[:3] # => [1, 2, 4]
del li[2] # li 现在是 [1, 2, 3]
# 合并列表
li + other_li # => [1, 2, 3, 4, 5, 6] - 并不会改变这两个列表
li + other_li # => [1, 2, 3, 4, 5, 6] - 并不会改变这两个列表
# 通过拼接来合并列表
li.extend(other_li) # li 是 [1, 2, 3, 4, 5, 6]