list.pop(1) code example
Example 1: 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 2: how to pop things out of list python
>>> l = ['a', 'b', 'c', 'd']
>>> l.pop(0)
'a'
>>> l
['b', 'c', 'd']
Example 3: pop function python
languages = ['Python', 'Java', 'C++', 'French', 'C']
return_value = languages.pop(3)
print('Return Value:', return_value)
print('Updated List:', languages)