主页
Python
Python 元组
demo_tuple_range
运行 ❯
×
更改方向
保存代码
更改主题
thistuple = ("apple", "banana", "cherry", "orange", "kiwi", "melon", "mango") print(thistuple[2:5]) #This will return the items from position 2 to 5. #Remember that the first item is position 0, #and note that the item in position 5 is NOT included
('cherry', 'orange', 'kiwi')