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

Idan shami
Idan shami
13,251 Points

creating list challenge

what is the problem with my code....

lists.py
my_list = ['f','h' ,1 ,2 ,[7, 4]]

1 Answer

Moosa Bonomali
Moosa Bonomali
6,297 Points

The challenge requires that you provide 3 numbers and 2 strings and a list with 2 elements at the end. You have only provided 2 numbers(1 and 2). Add a 3rd number and it should be ok, like so;

my_list = [5,'f','h' ,1 ,2 ,[7, 4]]
Idan shami
Idan shami
13,251 Points

weird, I tried it earlier like this... and it didn't take my answer, oh well, thank you!