Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

remove first element from list python

# 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))
Source by www.geeksforgeeks.org #
 
PREVIOUS NEXT
Tagged: #remove #element #list #python
ADD COMMENT
Topic
Name
5+4 =