"Interactive Web Pages with JavaScript" was retired on March 17, 2017. You are now viewing the recommended replacement.

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

steeve Francois
PLUS
steeve Francois
Courses Plus Student 572 Points

OK, now use .format() on the string "Treehouse loves {}" to put your name into the placeholder. Assign this to the varia

I really need help with this guys....OK, now use .format() on the string "Treehouse loves {}" to put your name into the placeholder. Assign this to the variable subject (so start with subject =).

strings.py
name = 'steeve'
 subject = 'Treehouse loves {}'.format(name)
subject = 'Treehouse loves {}' + name.formart()

1 Answer

Jonatan Spahn
Jonatan Spahn
6,362 Points

All you need on the code is name = 'steeve' subject = 'Treehouse loves {}'.format(name) Do you have a space between {}' and .format? You don't need to do that last line because the curly brackets {} already tell the script that this is a place holder and you format that place hold with .format(variable you want to call)