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)