Here is List1,
list1 = ["Red", "Blue", "Green"]
and list2
list2 = ["Silver","Yellow","Gray"]
I want to append the elements of list1 into list2 and the result should be in list1. How it is possible in Python?
Using the extend() method in Python, You can append the elements of one list to another list. In your case
list1 = ["Red", "Blue", "Green"]
list2 = ["Silver","Yellow","Gray"]
list1.extend(list2)
print(list1)
Output:
['Red', 'Blue', 'Green', 'Silver', 'Yellow', 'Gray']