Write a program that extracts the last three items in the list sports and assigns it to the variable last
Make sure to write your code so that it works no matter how many items are in the list.
Attachments:
Answers
Answered by
3
Answer:
I am using Python as my coding language while answering this question. Also I am writing just the skeletal structure not the exact code because of no formatting.
Basic Syntax:
list = [items of sports]
print(list[-3::])
Hope It Helps....
Similar questions