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 Lassen-Diesen
David Lassen-Diesen
184 Points

variables

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

Hi, I need a bot of assistance on the second part of this challenge,please.

strings.py
name="david"
subject="treehouse loves"+"name"="David"

1 Answer

You don't need to put ""'s around a variable name or it will be interpreted as a string. Also, since you saved your name as a variable, you don't need to retype it on the next line, just use the variable like so:

name = "David"
subject = "Treehouse loves " + name