Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

how to remove last 2 elements from list in python

l = list(range(1,5))
l = test_list[: len(test_list) - 2] 
Source by www.techiedelight.com #
 
PREVIOUS NEXT
Tagged: #remove #elements #list #python
ADD COMMENT
Topic
Name
1+5 =