>>> l = [1, 2, 3, 4, 5]
>>> l
[1, 2, 3, 4, 5]
>>> l.pop(0)
1
>>> l
[2, 3, 4, 5]
sample_list = [1, 2, 3, 4, 5]
sample_list.remove(sample_list[0])
print(sample_list)
>>> l = ['a', 'b', 'c', 'd']
>>> l.pop(0)
'a'
>>> l
['b', 'c', 'd']
>>>
list = [1,2,3]
print(list[1:3]) # output is [2,3]
del a_list[0]
x = [1, 2, 3]
print(x[1:]) # output is [2, 3]
# Python3 code to demonstrate
# removing front element
# using pop(0)
# initializing list
test_list = [1, 4, 3, 6, 7]
# Printing original list
print ("Original list is : " + str(test_list))
# using pop(0) to
# perform removal
test_list.pop(0)
# Printing modified list
print ("Modified list is : " + str(test_list))