Last active
June 3, 2020 15:40
-
-
Save SushmaBaliza/d666e59e0b13d4e3038e20b42fde9b60 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
list_1 = ['c', 'o', 'd', 'e', 'r', 'e', 'f', 'e', 'r'] | |
# Return only 3rd,4th,5th items of list. | |
print(list_1[2:5]) | |
# Return values from 6th item to last item of list | |
print(list_1[5:]) | |
# Return values from first item of list to 4th element | |
print(list_1[:3]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment