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 (Retired) Lists Redux Combining Lists

Create a list variable named list_1 that has three items.

Create a list variable named list_1 that has three items.

lists.py
list_1=[1,2,3]

Hi Sympathy,

Your code is good for passing task 1. Did you have a question about this or any of the tasks in this challenge?

2 Answers

akhter ali
akhter ali
15,778 Points

Your 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.

high 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