Python Python Basics (2015) Python Data Types String Formatting

I thought I had this one. I must be overthinking this.

Please help. I think I'm overthinking.

strings.py
"My {} is {}".format("name", "David")
Keifer Joedicker
Keifer Joedicker
5,869 Points

When you call .format don't reference the variables with quotations.

"My {} is {}".format(name, David)

1 Answer

Henrik Christensen
Henrik Christensen
Python Web Development Techdegree Student 36,886 Points
  • In task 1 you just have to create a variable with your name
  • In task 2 you have to use .format() on this string "Treehouse loves {}"