Python Program to Slice Lists (Get all the Items)

bookmark

my_list = [1, 2, 3, 4, 5]

print(my_list[:])

 

Output

[1, 2, 3, 4, 5]