python get range of elements code example
Example: get range of items of python list
names = ['Alice', 'Bob', 'Tom', 'Grace']
names[1:3]
# Output:
# ['Bob', 'Tom']
names = ['Alice', 'Bob', 'Tom', 'Grace']
names[1:3]
# Output:
# ['Bob', 'Tom']