Created
May 27, 2020 07:46
-
-
Save ashutoshpipriye/1e26c1cd90c955ecbac59ac47b25fd0d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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. | |
sports = ['cricket', 'football', 'volleyball', 'baseball', 'softball', 'track and field', 'curling', 'ping pong', 'hockey'] | |
last = sports[-3:] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment