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 trialRajeswari Sivakumar
3,077 PointsWhat is the appropriate method to call when one wants to end a list with the items listed in the argument of the method?
The example in question:
my_list.______(1)
Where one is meant to include correct method in the blank. I chose 'extend' but this is incorrect.
1 Answer
Cory Madden
7,120 PointsIn this case you would use append. Extend is used if you want to add a list to the list. like my_list.extend([1, 2, 3])
Rajeswari Sivakumar
3,077 PointsRajeswari Sivakumar
3,077 PointsThanks!