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 trialJames Harris
Python Web Development Techdegree Student 367 Points.format;
.format; I'm not sure that I am doing this right. I've submitted "check work" 3 times now. And its not running????
2 Answers
Loren Pierce
9,318 PointsHi 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.
Chris Freeman
Treehouse Moderator 68,441 PointsPromoting comment to Answer
James Harris
Python Web Development Techdegree Student 367 PointsHey thanks Loren. Man, I guess I had to much space in between my {}'.format; I appreciate your help . Thanks again man.
Chris Freeman
Treehouse Moderator 68,441 PointsChris Freeman
Treehouse Moderator 68,441 PointsCan you please post your current code?