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 trialJohn Smith
Python Web Development Techdegree Student 1,052 PointsIn this code challenge, what does it mean to add another list within 2 items?
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.
This is what I came up with so far.
my_list = [0, 1, 2, "people", "love"]
1 Answer
Oskar Lundberg
9,534 PointsThis challenge might be a bit misleading. You need 6 items in your list, the last being another list (with two new items in it) For example:
my_list = [0, 1, 2, "people", "love", ["unconditional love", True]]
^This passed the challenge
John Smith
Python Web Development Techdegree Student 1,052 PointsJohn Smith
Python Web Development Techdegree Student 1,052 PointsThanks a lot for explaining that Oskar, I really appreciate it.