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

.format;

.format; I'm not sure that I am doing this right. I've submitted "check work" 3 times now. And its not running????

strings.py

2 Answers

Hi James,

I am assuming you had no problem getting the 'name' variable put together, so I will talk about the second step. The correct syntax when using a placeholder is: "This is an {}".format(example)
Assuming I placed the string "example" in the variable example, the string after formatting would say "This is an example" Hope this helps.

Hey thanks Loren. Man, I guess I had to much space in between my {}'.format; I appreciate your help . Thanks again man.