-2

Hello I was wondering how you could do the following in python

Suppose we have these lists

["Apples","Pears","Oranges","Grapes"]
["Apples","Pears","Oranges","Grapes","Strawberries"]
["Apples","Pears","Oranges","Pumpkins","Cherries","Lemons"]

And I wanted to extract to extract the 4th element and beyond. So...

["Grapes"]
["Grapes","Strawberries"]
["Pumpkins","Cherries","Lemons"]

The lists will all have more than 3 elements.

How would I do this?

Lyra Orwell
  • 1,048
  • 4
  • 17
  • 46

1 Answers1

0
fruits = ["Apples","Pears","Oranges","Pumpkins","Cherries","Lemons"]
print(fruits[3:])
pjk
  • 547
  • 3
  • 14