執行 ❯
擁有你自己的 Python 伺服器
×
更改方向
更改主題,深色/淺色
前往 Spaces
thistuple = ("apple", "banana", "cherry", "orange", "kiwi", "melon", "mango") print(thistuple[-4:-1]) #Negative indexing means starting from the end of the tuple. #This example returns the items from index -4 (included) to index -1 (excluded) #Remember that the last item has the index -1,
('橙子', '獼猴桃', '西瓜')