Answers for "add element in a list"

1

python how to add to a list

food = "banana"
basket = []

basket.append(food)
Posted by: Guest on October-01-2020
0

lsit append in python

List=[1,'a',"hello"]
List.append(True)
print(List)
# output: [1, 'a', 'hello', True]
Posted by: Guest on October-21-2020

Python Answers by Framework

Browse Popular Code Answers by Language