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

matthew jim
PLUS
matthew jim
Courses Plus Student 175 Points

what am I doing wrong?

I think I'm doing it right but obviously I'm not. What am I doing wrong?

strings.py
name = "matt "
subject += "treehouse loves"

2 Answers

A few things to think about. The += works when you are adding to a variable. The example in the video uses the += because he is adding to the "name" variable. Here, you are creating a NEW variable, so the += would not work.

Also, be careful with capitalization and punctuation in the challenges. They are very specific, i.e. "treehouse" vs. "Treehouse".

So, subject = "Treehouse loves" + .......

Oh, and don't forget your space!!

matthew jim
PLUS
matthew jim
Courses Plus Student 175 Points

THANK YOU!!! I WAS LOSING MY MIND! I GET IT NOW