Explore Topics

How To Append Elements Of One List Into Another List Using Python

Last Updated : 18 Apr, 2025 - Asked By Ashok

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?

python  append elements 

Answers
2024-10-02 12:16:00

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']

Your Answer



Other Resources

Quiz Image
Quiz

Test your knowledge with interactive quizzes.

Interview Questions Image
Interview Questions

Prepare for interviews with curated question sets.

Q&A Image
Q&A

Ask your coding-related doubts and get answers.

Certification Image
Certification

Earn certifications to enhance your resume.

internships Image
Internships

Hands-on projects to improve your skills.

Quiz Image
Quiz

Test your knowledge with interactive quizzes.

Interview Questions Image
Interview Questions

Prepare for interviews with curated question sets.

blog Image
Blogs

Add your technical blogs and read technical topics.

Certification Image
Certification

Earn certifications to enhance your resume.

Q&A Image
Q&A

Hands-on projects to improve your skills.