-2

I'm trying to get every word after the 2nd in my program. If I do

inputhere.split()[2]

I only get the 2nd word in the input, not every word after the 1st. How can I get every word after the 1st?

1 Answers1

-1

Use a [i:] to slice your list at a position i: Understanding slicing

inputhere.split()[2:]
Leon Menkreo
  • 129
  • 4