Update 10.常用数据结构之元组.md

This commit is contained in:
lile-02 2025-05-15 14:11:49 +08:00 committed by GitHub
parent 7a798e481d
commit 8a781d8d80
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -26,7 +26,7 @@ print(t1[2]) # 98
print(t2[-1]) # 四川成都
# 切片运算
print(t2[:2]) # ('骆昊', 43)
print(t2[:2]) # ('骆昊', 45)
print(t2[::3]) # ('骆昊', '四川成都')
# 循环遍历元组中的元素