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

Micah Jones
Micah Jones
1,173 Points

make a subject variable that concatenates the string "Treehouse loves" and your name

my error message is 'you must use a + sign' and I am! I'm not sure what i'm doing wrong here.

strings.py
name='Micah'
subject="Treehouse loves {}".format(name)
subject = "Treehouse loves " + name

2 Answers

Steven Parker
Steven Parker
231,275 Points

It looks like you got it right, but you did it two different ways.

For this particular challenge, just do it the simple way (the second one). Just remove your first assignment and you should be good.

Hi Micah, this is what you should have done:

name = 'Haider'
subject = "Treehouse loves " + name
#you should have added a space inside the string so there is a gap between the string and your name