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 trial

Python Python Collections (2016, retired 2019) Lists Combining Lists

I can't seem to figure out why task 1 is no longer passing

Not sure how to change my code so that task 1 is passing

lists.py
best = ['cat', 'dog', 'mouse']
best.append('rat', 'lizard')

1 Answer

Tadeáš Firich
Tadeáš Firich
7,866 Points

Hello nicole, I solved your problem. The problem is with missing [] in the extend method. You can type something like this:

best = ['My','name','is']
new = ['Super','Man']
best.extend(new)

Or you can type simply this code:

best = ['My','name','is']
best.extend(['Super','Man'])

Why is task 1 is no longer passing i really don't know. Maybye the missing brackets in the extend method makes and error.

Was it helpful for you?