Question: Write a program that extracts the last three items in the listsportsand assigns it to the variablelast. Make sure to write your code so that

Write a program that extracts the last three items in the listsportsand assigns it to the variablelast. Make sure to write your code so that it works no matter how many items are in the list.

1

sports = ['cricket', 'football', 'volleyball', 'baseball', 'softball', 'track and field', 'curling', 'ping pong', 'hockey'] 

2

 

3

 

4

 

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!