# Reduce size of list by 2 elements. values = values[:-2] print(values) [10, 20, 30, 40, 50] [10, 20, 30]
values = [1, 2, 3, 4, 5, 6, 7, 8] print(values) #reduce the size of this list by 2 values = values[:-2] print(values)