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

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)
CCC Online Test Python Programming Tutorials Best Computer Training Institute in Prayagraj (Allahabad) Online Exam Quiz O Level NIELIT Study material and Quiz Bank SSC Railway TET UPTET Question Bank career counselling in allahabad Best Website and Software Company in Allahabad Website development Company in Allahabad