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

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.