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 trialtest account
565 PointsPython: .FORMAT method usage.
I have tried the string in several ways and I cannot get it to work. What is the answer to this and why?
name = "strong"
subject = ("Treehouse love {}".format("strong"))
2 Answers
Jennifer Nordell
Treehouse TeacherHi there! It was your second attempt in the middle that was correct, with one tiny exception. The string is supposed to be "Treehouse loves", but you wrote "Treehouse love". Remember, these challenges are very strict and your answer must match to the letter. This includes capitalization, spelling, punctuation, and even spacing.
Take a look:
name = "strong"
subject = "Treehouse loves {}".format(name)
You were literally off by one character. I'd say job well done!
test account
565 Pointsname = "strong" subject = ("Treehouse love {}".format("strong"))
or
name = "strong" subject = "Treehouse love {}".format(name)
or
name = "strong" subject = "Treehouse love {}".format("strong")