Welcome to the Treehouse Community
The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

Blake Rogers
3,069 PointsOK, so now use .format() on the string "Treehouse loves {}" to put your name into the placeholder. Assign this to the va
OK, so now use .format() on the string "Treehouse loves {}" to put your name into the placeholder. Assign this to the variable subject again.
help me with this

Blake Rogers
3,069 PointsThis
name = "Dylan" subject = "Treehouse loves {}" subject = print(subject.format(name))
name = "Dylan" subject = "Treehouse loves {}" print(subject.format(name))
name = "Dylan" subject = "Treehouse loves {}" subject = subject.format(name)
6 Answers

Robert Nardizzi
13,226 Pointsname =(Bobcat) subject = "Treehouse loves {}".format(name)

Ken Alger
Treehouse TeacherBlake;
You are definitely close and have the right idea. The challenge is looking for the format()
method to be directly attached to the string that is assigned to the subject
variable. We don't need to print anything.
Try doing the subject
variable step all in one line and see how that works.
Happy coding,
Ken

Blake Rogers
3,069 PointsPlease give me an example.

Ken Alger
Treehouse TeacherSure:
Here's an example, not the answer, but you should be able to get there.
name = "Blake"
statement = "{} can code in Python.".format(name)
Ken

Michael Murphy
14,097 PointsI didn't know it had to be on the same line, I tried to apply format on subject as a second step and that wasn't working. Your advice and example helped a lot.

Paul Mburu
1,098 PointsHi robert, I entered name="Bobcat" subject = "Treehouse loves {}".format(name)
and it didn't work.

Paul Mburu
1,098 PointsIt worked i forgot to put = after subject.

jacquesdiaquoi2
1,874 PointsI am new to programming but I just cannot get this on workspace but it works fine on the python shell. name = "jacques" subject = "Treehouse loves {} ".format(name) when I use print it works

Sandhya Akkinapalli
977 Pointsname = "Alex" subject = "Treehouse loves {}".format(name)
Ken Alger
Treehouse TeacherKen Alger
Treehouse TeacherWhat have you tried?