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!

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

name='sha' subject='Treehouse loves' print(subject + name)

code not working

subject='Treehouse loves'
print(subject + name)

1 Answer

Jennifer Nordell
Jennifer Nordell
Treehouse Teacher

Hi Sha Sud ! You're on the right track. I see you understand concatenation. However, the challenge doesn't want you to print anything. And it wants the subject variable to contain the string literal and the value of the name variable. Currently, your subject only contains "Treehouse loves". By the way, you're also missing a space. If you were to print that out right now, it'd say "Treehouse lovessha" instead of "Treehouse loves sha". Take a look at how close you are! :sparkles:

subject='Treehouse loves ' + name

Good luck!

Hello Jennifer! Thank u now the code is working.