Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

pop function in python

#pop() function
L1 = [20,4,-6,38,-12]
print(' pop', L1.pop())
print('List ', L1)
x=L1.pop(2)
print(' popped:', x)
print('final List :', L1)
#output:
pop -12
List  [20, 4, -6, 38]
popped: -6
final List : [20, 4, 38]
 
PREVIOUS NEXT
Tagged: #pop #function #python
ADD COMMENT
Topic
Name
9+4 =