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

need help with strings

OK! Make a new variable named subject that concatenates (uses the + sign) the string "Treehouse loves" and your name variable.

not sure how to start this!!!!!!!!

strings.py
name = "egal"
subject = "Treehouse loves " 
print(subject + name)

3 Answers

name = "egal"
subject = "Treehouse loves " + name
print(subject)
Mauricio Perez-Oviedo
Mauricio Perez-Oviedo
4,132 Points

Hey there, I don't believe they are asking to print.

This may work:

name = "egal" subject = "Treehouse loves " + name

Although the question doesn't have a space after the word "loves", I do see you added it to separate the three words.

Good luck!

Yea made a mistake no print statement required, I put the spaces like they said and I still get this error message!!!!

Bummer! Remember that using + means your strings need extra spaces