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 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,885 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
231,248 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.