Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR TYPESCRIPT

python list pop multiple

# Removes (Pops) the last 6 items from a list
del myList[-6:]
# Removes the second item from a list (index starts at 0)
myList.pop(1)
# Slices the list and keeps only the first 6 items
myList = myList[:6]
 
PREVIOUS NEXT
Tagged: #python #list #pop #multiple
ADD COMMENT
Topic
Name
3+5 =