您好,我想知道如何在 python 中執(zhí)行以下操作假設(shè)我們有這些列表["Apples","Pears","Oranges","Grapes"]["Apples","Pears","Oranges","Grapes","Strawberries"]["Apples","Pears","Oranges","Pumpkins","Cherries","Lemons"]我想提取以提取第 4 個元素及以后的元素。所以...["Grapes"]["Grapes","Strawberries"]["Pumpkins","Cherries","Lemons"]這些列表都將包含 3 個以上的元素。我該怎么做?
1 回答

ABOUTYOU
TA貢獻(xiàn)1812條經(jīng)驗 獲得超5個贊
fruits = ["Apples","Pears","Oranges","Pumpkins","Cherries","Lemons"] print(fruits[3:])
添加回答
舉報
0/150
提交
取消