Answers for "python list push item"

1

python add item to list

# to add an item to a list
list.append(item)

# To extend an list with a new list
list1.extend(list2)
Posted by: Guest on November-25-2020
0

add an element to list python

a=[8,5,6,1,7]
a.append(9)
Posted by: Guest on May-31-2020

Python Answers by Framework

Browse Popular Code Answers by Language