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 Creating lists

How do i answer this?

This challenge is just meant as a refresher. Create a single new list variable named my_list. Put 3 numbers and 2 strings into it in whatever order you want. For the last member, though, add another list with 2 items in it.

lists.py
def my_list ():

1 Answer

Hello

my_list = [1,2,3,'x','y',[1,'a']]

I strongly recommend you browse through this: https://docs.python.org/3/tutorial/datastructures.html

hope this helps

Although Mark's answer: my_list = [1,2,3,'x','y',[1,'a']] is correct, I personally feel like sending a beginner to the data structures doc from the Python manual is like saying to someone, "You can make scrambled eggs....so now you can totally make a consommΓ© (a very complicated egg dish)." I don't feel like the resource matches the skill level of the student.