Example 1: python pop element
my_list = [123, 'Add', 'Grepper', 'Answer']
my_list.pop()
-->[123, 'Add', 'Grepper']
my_list = [123, 'Add', 'Grepper', 'Answer']
my_list.pop(0)
-->['Add', 'Grepper', 'Answer']
my_list = [123, 'Add', 'Grepper', 'Answer']
any_index_of_the_list = 2
my_list.pop(any_index_of_the_list)
-->[123, 'Add', 'Answer']
Example 2: python pop
my_list = [123, 'Add', 'Grepper', 'Answer'];
print "Pop default: ", my_list.pop()
> Pop default: Answer
print "Pop index: ", my_list.pop(1)
> Pop index: Add
Example 3: how to pop things out of list python
>>> l = ['a', 'b', 'c', 'd']
>>> l.pop(0)
'a'
>>> l
['b', 'c', 'd']
Example 4: python list pop
some_list = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
print(some_list)
some_list.pop()
print(some_list)
=====================================================
[1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
[1, 2, 3, 4, 5, 6, 7, 8, 9]
Example 5: python list pop
l1 = [1,2,3,4,5]
print(l1.pop())
print(l1.pop(2))