为了账号安全,请及时绑定邮箱和手机立即绑定

从第n项开始到列表python的末尾

从第n项开始到列表python的末尾

翻过高山走不出你 2023-05-09 15:13:07
您好,我想知道如何在 python 中执行以下操作假设我们有这些列表["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贡献1812条经验 获得超5个赞

fruits = ["Apples","Pears","Oranges","Pumpkins","Cherries","Lemons"]
print(fruits[3:])


查看完整回答
反对 回复 2023-05-09
  • 1 回答
  • 0 关注
  • 94 浏览
慕课专栏
更多

添加回答

举报

0/150
提交
取消
意见反馈 帮助中心 APP下载
官方微信