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 trialNeil Archambault
1,838 Pointschallenge task 2 of 2 strings. Having trouble concatenating strings. Need help
having trouble concatenating strings, named variables and then tried to +, not working.
name = 'neil'
2 Answers
Steven Parker
231,236 PointsWell, you've got the right idea — string concatenation is done with the plus-sign (+) operator. Did you remember to assign your concatenated string to "subject"?
subject = "Treehouse Loves " + name
Neil Archambault
1,838 Pointsname = 'neil' last_name = 'Treehouse_loves' subject = last_name + name
Neil Archambault
1,838 PointsNeil Archambault
1,838 PointsI figured it out this way, and it said I was correct. I am going to try your way, seems quicker and easier. Thank you very much.