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

David Gabriel
seal-mask
.a{fill-rule:evenodd;}techdegree
David Gabriel
Python Web Development Techdegree Student 979 Points

string concatenate , thanks Parker !this my second attempt but is not helping

name = "Deja Vu huh" subject = "Treehouse_Loves" + ' ' + "Deja Vu huh"

strings.py
name = "Deja Vu huh"
subject = "Treehouse_Loves" + ' ' +  "Deja Vu huh"

3 Answers

stjarnan
seal-mask
.a{fill-rule:evenodd;}techdegree seal-36
stjarnan
Front End Web Development Techdegree Graduate 56,488 Points

Hi David,

As you create a variable called name containing your string "Deja Vu huh", you could later use that to place that string wherever you'd like, like this:

subject = "Treehouse_Loves" + ' ' + name

Try that.

By doing this you don't have to repeat yourself over and over, and if the name variable changes it will change everywhere you use it and you won't need to change it manually.

Steven Parker
Steven Parker
231,269 Points

The challenge specifically says to combine the string "Treehouse loves" and your name variable. Note that there's a space between the words (not an underscore) and that "loves" is all lower-case (no capital "L").

And instead of repeating your name in quotes, you should use the variable name that you created in task 1.

Also, I will respond to a comment added to an existing question if you're still working on the same issue.

stjarnan
seal-mask
.a{fill-rule:evenodd;}techdegree seal-36
stjarnan
Front End Web Development Techdegree Graduate 56,488 Points

David, I think you need to read the instructions once more a little bit more thorough.

As Steven Parker told you, you are not writing the correct string. The instructions asks you to write "Treehouse loves", not "Treehouse".

Good luck

Steven Parker
Steven Parker
231,269 Points

You're close now ... you still need the word "loves" in there. And don't put quotes around the name of a variable.