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 trialMUZ140348 Sympathy Makururu
10,209 PointsCreate a list variable named list_1 that has three items.
Create a list variable named list_1 that has three items.
list_1=[1,2,3]
2 Answers
akhter ali
15,778 PointsYour code looks good, however I believe the pep8 way to write this would be
list_1 = [1, 2, 3]
Not
list_1=[1,2,3]
Both methods will work though.
MUZ140889 Dephine Chenayi Chihota
6,766 Pointshigh sympathy. I don't see a problem with your code. just make sure that for task 2 if you used a list of strings they should be enclosed in quotes, if you miss them it might say task 1 no longer passing. then employ concatenation by use of a plus sign just like we do with strings. you can try this code it worked for me
list_1 = [1, 2, 3]
list_2 = ["a", "b", "c"]
list_3 = list_1 + list_2
Robert Richey
Courses Plus Student 16,352 PointsRobert Richey
Courses Plus Student 16,352 PointsHi Sympathy,
Your code is good for passing task 1. Did you have a question about this or any of the tasks in this challenge?