python return range of list 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']