filmov
tv
Write a Python Program Add Two Lists
Показать описание
Hi in this video I tried to explain Write a Python Program Add Two Lists
Python Scripts
======================
Python Functions Solved
==========================
Python Programs Solved
============================
Steps
=======
a) get two lists list1, list2
b) using for loop enumerate the list1 and list2
b) add the elements of list1 and list2 and append it to result list
d) print the final resultant list
code
===============
list1 = [12, 23, 34, 45, 56, 67]
list2 = [1, 2, 3, 4, 5, 6]
result = []
for index, item in enumerate(list1):
result += [item + list2[index],]
print(result)
keywords
===============
write a python program to add two lists,
python program to add elements of two lists,
python program to add elements of two lists,
python program to add two lists,
python program to add elements of two lists,
write a python program to add two lists,
Python Scripts
======================
Python Functions Solved
==========================
Python Programs Solved
============================
Steps
=======
a) get two lists list1, list2
b) using for loop enumerate the list1 and list2
b) add the elements of list1 and list2 and append it to result list
d) print the final resultant list
code
===============
list1 = [12, 23, 34, 45, 56, 67]
list2 = [1, 2, 3, 4, 5, 6]
result = []
for index, item in enumerate(list1):
result += [item + list2[index],]
print(result)
keywords
===============
write a python program to add two lists,
python program to add elements of two lists,
python program to add elements of two lists,
python program to add two lists,
python program to add elements of two lists,
write a python program to add two lists,