Python Python Basics (2015) Python Data Types String Formatting

I'm not sure how to complete this task. perhaps I don't know the question

I type the code into the console and I get 'Treehouse loves Soren' which I think is the answer... not sure what I have to do to pass this quiz. it says not to print any thing... and I ebven tried print(subject.format(name)) but still get an error

strings.py
name = "Soren"
subject = "Treehouse loves {}"
subject.format(name)

1 Answer

Steve Hunter
MOD
Steve Hunter
Treehouse Moderator 56,087 Points

Hi there,

The question asks you to call .format() on the string, so use dot notation after the last quotation mark. Pass in the name variable as the argument. Assign the result of that into subject.

Steve.