Q:

python add elements of two lists together

list1 = ["a", "b" , "c"]
list2 = [1, 2, 3]

list1.extend(list2)
print(list1)
4
list1 = [1, 2, 3]
list2 = [4, 5, 6]
sum_list = []

for (item1, item2) in zip(list1, list2):
	sum_list.append(item1 + item2)

print(sum_list)
0
list1 = ["a", "b" , "c"]
list2 = [1, 2, 3]

list3 = list1 + list2
print(list3)
1

New to Communities?

Join the community