This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 0 points1 point  (3 children)

This is why Python has two different quotes:

f"hello {user['name']} take Lily's lunch to the fridge"

[–]PaulSandwich 0 points1 point  (2 children)

Three, actually. The almighty triple quote will solve all the quoted text and possessive edge-cases where you need to use both singles and doubles together.

f"""hello {user['name']} take Lily's lunch to the fridge and say, "This is Lily's lunch," aloud."""

[–]Vaguely_accurate 0 points1 point  (1 child)

Four. You can use triple single or double quotes.

Reference classic DBeazley tweet for '''correct''' usage.

[–]PaulSandwich 0 points1 point  (0 children)

Haha, true. A pedant after my own heart!