Answers for "add elements of list python"

0

add an element to list python

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

python add all values of another list

a = [1, 2, 3]
b = [4, 5, 6]
a += b
# another way: a.extend(b)
Posted by: Guest on February-03-2020
0

how to add an element in a list in python

thislist = ["apple", "banana", "cherry"]

thislist.insert(1, "orange")

print(thislist)
Posted by: Guest on May-06-2021

Code answers related to "add elements of list python"

Python Answers by Framework

Browse Popular Code Answers by Language