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 trial

Python Python Basics (2015) Python Data Types String Formatting

Grayson Jones
Grayson Jones
550 Points

What?

Not sure where to go from here.

I was certain that if I assigned the string 'Treehouse Loves {}'

To a variable (Ex: the variable will be hello) I would do. print(hello.format(name))

Where am I going wrong here?

strings.py
name = 'Grayson'
subject = 'Treehouse Loves {}'
print(subject.format(name))

1 Answer

Jon Wood
Jon Wood
9,884 Points

I reviewed the challenge and it seems that you don't need to print :). Just remove the last line and add the .format to the second string and it should be good to go!

Grayson Jones
Grayson Jones
550 Points

Jon Wood, Ha! More like. Jon's a big help man.

Jon Wood
Jon Wood
9,884 Points

Heh! Glad to help! :)