There are methods append and extend in list in Python. what is the dif
Guys, there are methods append and extend in list in Python. what is the difference between them and when should i use each?
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Rajanikant HawaldarRank #110 · 20.2K reputationPosted Dec 27, 2020, 11:09 AM EST
Sachin SinghRank #66 · 26.2K reputationPosted Dec 27, 2020, 10:48 AM EST
Harsh ShahRank #1,322 · 1.3K reputationPosted Dec 27, 2020, 10:47 PM EST
Aman GuptaRank #193 · 12.4K reputationPosted Dec 27, 2020, 11:14 AM EST
Output:
['C#', 'Corner', 'Community']Output:
['C#', 'Corner', 1, 0, 2, 4]Mageshwaran RRank #411 · 6.1K reputationPosted Dec 27, 2020, 11:44 PM EST