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 trialandres rivera
1,009 Pointsname = "andres" subject = 'Treehouse loves {}' subject.format(name) dont know what i am doing wrong please help
this is for using the .format method and im doing everything i learn here and dont know what im doing wrong, can someone tell me how to do it right please?
name = "andres"
subject = 'Treehouse loves { }'
subject.format(name)
2 Answers
Amanda Allison
9,104 PointsIt looks like there's a space inside the curly braces on line 2. It should be: subject = 'Treehouse loves {}'
behar
10,799 PointsHey andres! You have left a space between your curly braces. And secondly you should format directly on the string.
name = "andres"
subject = 'Treehouse loves {}'.format(name)