Selecting a sublist from a list

suggest change
lst = ['a', 'b', 'c', 'd', 'e']

lst[2:4]
# Output: ['c', 'd']

lst[2:]
# Output: ['c', 'd', 'e']

lst[:4]
# Output: ['a', 'b', 'c', 'd']

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents