Programming Examples

Python program to creates a third list after adding two lists


WAP that creates a third list after adding two lists.

Solution

list1=eval(input("Enter list 1 : "))
list2=eval(input("Enter list 2 : "))
list3=list1+list2
print("Given List are : ",list1," and ",list2)
print("The sum of list are : ",list3)
Output/ Explanation:

Enter list 1 : 3,4,5
Enter list 2 : 2,5,6,4
Given List are :  (3, 4, 5)  and  (2, 5, 6, 4)
The sum of list are :  (3, 4, 5, 2, 5, 6, 4)
Latest Current Affairs 2024 Online Exam Quiz for One day Exam Online Typing Test CCC Online Test Python Programming Tutorials Best Computer Training Institute in Prayagraj (Allahabad) Online MBA 2 years Online MCA Online BCA Best Website and Software Company in Allahabad