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 Formatting

Challenge, still being graded as wrong answer.

I followed a suggestion given, and tried the listed code but still getting this error - Bummer! Be sure to use the {} placeholder and the .format() method. Any other ideas as to what I'm doing wrong?

strings.py
name="Cheri"
subject="Treehouse loves {} ".format(name)

5 Answers

Steven Parker
Steven Parker
229,708 Points

It looks like you just have an extra space after the placeholder in your template string. The challenges can be very picky about ouputs!

Thank you, let me check on that.

Thank you, that worked. Ok, so I thought in one of the videos, that it said that we should put a space, so that Python would skip a space between words. I guess in this case. the space wasn't desirable.

Steven Parker
Steven Parker
229,708 Points

That's right, since in this case you're formatting not concatenating.

Ok, I gotta remember to do that, I'm still way new to treehouse.

Steven Parker
Steven Parker
229,708 Points

Well, welcome to the community! And happy coding!

:)