Selecting a sublist from a list
suggest changelst = ['a', 'b', 'c', 'd', 'e']
lst[2:4]
# Output: ['c', 'd']
lst[2:]
# Output: ['c', 'd', 'e']
lst[:4]
# Output: ['a', 'b', 'c', 'd']
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents