Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

Python Python Basics (2015) Python Data Types String concatenation

concatenation problem.

im not sure if I've simply formatted the answer improperly or if my answer is actually just wrong, help!

strings.py
name = "jordan"
subject = "Treehouse loves"
subject + name = 
Antonio De Rose
Antonio De Rose
20,882 Points
name = "jordan" #this is correct
subject = "Treehouse loves"#you got to concatenate this with the variable name (dont forget to add ones pace  after loves)
subject + name = #not necessary
Jose Aguirre
Jose Aguirre
14,866 Points

name = "jordan" subject = "Treehouse loves"

you've got the first part right, both of your variables are declared but they want subject to be "Treehouse loves jordan", right now it is just "Treehouse loves"

you can set subject to subject + name like this

subject = subject + name

but, there might be spacing issues here

let me know if that doesn't make sense you always though will only have one variable name on the left side of an equals sign.

1 Answer

Steven Parker
Steven Parker
216,135 Points

You don't need that third line.

You just want to add "+ name" to the end of the second line.

Also remember to add a space after the word "loves" as Antonio suggested.

yes this answer made sense, thank you and Jose and Antonio for helping me with this.