Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

delete 5 first in list python

# delete n from last
n=3

a=[1,2,3,4,5,6,7,8,9,10]

del a[-n:]

print(a)
# [1, 2, 3, 4, 5, 6, 7]
Source by www.techiedelight.com #
 
PREVIOUS NEXT
Tagged: #delete #list #python
ADD COMMENT
Topic
Name
3+4 =