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

shopping list

I am lost?

Create a new empty list named shopping_list

Create a function named add_to_list that declare a parameter name item

#Add the item to the list I know I am not even close but what I do I do next? shopping_list def add_to_list("item") print (item)

1 Answer

Steven Parker
Steven Parker
229,732 Points

The "append" method of an array is a convenient way to add a new item onto it.