Q. Write a program that input two lists and create a third, that contains all elements of the first followed by all elements of the second.


You can understand by Watching video :-



Answer :-

a = eval(input ("Enter the first list ="))
b = eval (input ("Enter the second list ="))
print ("New list = ", a+b)

Output :-

Enter the first list =[1,2,3,4]
Enter the second list =[5,6,7,8,9]
New list =  [1, 2, 3, 4, 5, 6, 7, 8, 9]

>>> 

Enter the first list =[2,4,6,8,1]
Enter the second list =[3,5,7,9]
New list =  [2, 4, 6, 8, 1, 3, 5, 7, 9]

>>> 


Post a Comment

You can help us by Clicking on ads. ^_^
Please do not send spam comment : )

Previous Post Next Post