KnowledgeBoat Logo
|
LoginJOIN NOW

Computer Science

Write a program that inputs two lists and creates a third, that contains all elements of the first followed by all elements of the second.

Python

Python List Manipulation

62 Likes

Answer

l1 = eval(input("Enter first list: "))
l2 = eval(input("Enter second list: "))
l3 = l1 + l2
print("Joined List:", l3)

Output

Enter first list: [1, 2, 3, 4, 5]
Enter second list: [11, 12, 13, 14, 15] 
Joined List: [1, 2, 3, 4, 5, 11, 12, 13, 14, 15]

Answered By

25 Likes


Related Questions