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 trialJose Cascao
Courses Plus Student 267 Pointsok, whatΒ΄s wrong?
help is needed
name = "jose {} carvalho"
name.format("antonio")
subject = "Treehouse loves {}"
subject = subject.format(name.format("antonio"))
2 Answers
Manish Giri
16,266 PointsIf you place { }
in a string, think of it as a placeholder for a string value you want to plug in yourself.
Example - "Hello {}".format("world")
would print "Hello world".
So, if your subject is - "Treehouse loves {}", then in your
.format()`, you just need to use your name.
Also, I don't think the challenge specifically asks you to use .format()
on the name
variable too, so you can just place your name direclty in name
, and it should work fine.
Jose Cascao
Courses Plus Student 267 PointsThank you Manish
Timothy Efana-Okon
245 PointsTimothy Efana-Okon
245 PointsPlease can you write it down I have tried this for over an hour and I still do not understand