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 trialPerfect Tinotenda Mashingaidze
5,070 PointsCreating lists
I'm stack on making my_list challenge help guys
my_list = [1,2,3 "perfect", "Tanatswa"]
2 Answers
Eric M
11,546 PointsIf you insist:
my_list = [1,
2,
3,
"perfect",
"Tanatswa",
["I'm a string, and the first element in the second list",
"I'm another string, and the second element in the list within a list"]
]
Eric M
11,546 PointsFirst off, you probably want a comma between 3
and "perfect"
in your list.
Secondly, this challenge wants exactly 6 items in a list, with the last item being another list that itself contains 2 items. So after you add your comma to separate the third and fourth elements, you'll want to add in that final list item after "Tanatswa",
Perfect Tinotenda Mashingaidze
5,070 PointsCan you write the list for me so that I can get the clear picture
Perfect Tinotenda Mashingaidze
5,070 PointsPerfect Tinotenda Mashingaidze
5,070 PointsHere is what I did....
my_list = [1,2,3, "perfect", " tanatswa", [1, "drey"]]
Thanks a lot....it worked