Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialLuis Barahona
4,529 PointsOkay now let's add the others to the beatles.
Okay now let's add the others to the beatles. Can you please use the method on lists that allows you to add all values from one list to another?
beatles = ["John"]
beatles.append("Paul")
others = ["George", "Ringo"]
1 Answer
รyvind Andreassen
16,840 PointsThe challenge actually gives you the answer in the debugging. This problem requires you to use the extend-method on the lists. I went for the easy solution of just doing the following.
beatles = beatles + others
Which works, but it's not what the challenge wants. The solution that gets accepted is the following on.
beatles = ["John"]
others = ["George", "Ringo"]
# Your code here
beatles.append("Paul")
beatles.extend(others)
nakalkucing
12,964 Pointsnakalkucing
12,964 PointsHi Luis! Could you explain what your question is? Thanks in advance. :)