Multiline strings and format

Ex 14- How did he combine a multi line string with a format string? Is not working for me. The {} are printed as strings.

Hello Aaron;
Hope its ok for me to respond to this and it helps and doesn’t hurt.

print(f""" Alright, so you said {likes} about liking me. You live in {lives}. Not sure where that is. And you have a {computer} computer. Nice. """)
The triple quotes ''' allowing strings to span multiple lines. The format f (f-string) and curly braces{} act the same as a single string text and should print their values .

Thanks for replying. I get it. In my code I didn’t add the f. I just went ahead thinking it was just a multi line string, so I put only the triple quotes.

A free service run by Zed A. Shaw for learncodethehardway.org.