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

Jt Miller
Jt Miller
1,242 Points

formating

I can't seem to get this right and I've tried for 20 mins

strings.py
name = "Justice"

2 Answers

Hi Justice,

You've done the first part of the challenge fine. The second part needs you to create a variable called subject. Inside subject store "Treehouse loves {}". But on that string, call the .format() method - just chain the dot directly on the end of the string, after the closing ". Pass the variable you created in the first task in as a parameter, i.e. put name inside the ().

That should get you through.

Steve.

Timm Derrickson
Timm Derrickson
21,205 Points

Could you please post the question or problem that you are trying to solve?