Answers for "python how to put element in a list"

15

how to add element to list python

lst = ["f", "o", "o", "b", "a","r"]
lst.append("b")
print(lst) # ["f", "o", "o", "b", "a", "r", "b"]
Posted by: Guest on November-12-2021
0

python code to add element in list

a=[1,2,3]
b=[2,3,4]
a.append(b)
Posted by: Guest on November-24-2021

Code answers related to "python how to put element in a list"

Python Answers by Framework

Browse Popular Code Answers by Language