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 2021 CCC Practice Test Hindi Python Programming Tutorials Best Computer Training Institute in Prayagraj (Allahabad) Best Java Training Institute in Prayagraj (Allahabad) Best Python Training Institute in Prayagraj (Allahabad) O Level Online Test in Hindi Bank SSC Railway TET UPTET Question Bank career counselling in allahabad Sarkari Naukari Notification Best Website and Software Company in Allahabad Sarkari Exam Quiz