Python Python Basics (2015) Python Data Types String Formatting

Nicholas Osei-Kumaning
Nicholas Osei-Kumaning
446 Points

how do i get my name variable to the placeholders using .format

name = "Nicholas" subject= "Treehouse loves {}" subject.format(name)

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

1 Answer

Hey, you've almost got it. But instead of writing 'subject.format(name)', try putting the '.format(name)' on the end of your subject string. Hope this helps. :)

Your welcome!