Computer Science
Write a Python program to append a list to the second list.
Python
Python List Manipulation
1 Like
Answer
list1 = eval(input("Enter the first list: "))
list2 = eval(input("Enter the second list: "))
list1.extend(list2)
print("Appended List:", list1)
Output
Enter the first list: [22, 44, 66, 88]
Enter the second list: [10, 30, 50, 70, 90]
Appended List: [22, 44, 66, 88, 10, 30, 50, 70, 90]
Answered By
1 Like
Related Questions
Write a Python program to multiply all the items in a list.
Write a Python program to get the smallest number from a list.
Write a Python program to generate and print a list of first and last 5 elements where the values are square of numbers between 1 and 30 (both included).
Write a Python program to get unique values from a list.