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 trialjefffromcali
649 PointsI am using the my_list.extend(my_list2) to add the last item and I continue to get a "didn't find enough items error"
Does anyone have any suggestions? Thank you.
my_list = []
my_list.append(1)
my_list.append(2)
my_list.append(3)
my_list.append('string1')
my_list.append('string2')
my_list2 = ['thing1', 'thing2']
my_list.extend(my_list2)
2 Answers
Adam N
70,280 PointsExtend will add the items to the list as individual items. The last part of the instructions want you to insert a list of two items into the original list.
jefffromcali
649 Pointsthanks adam n - I did end up using the append method instead of extend. I didn't know you could append an entire list . . .
Adam N
70,280 PointsYou can mark this question as solved by selecting a "best answer".