How does python's triple-quote string work in Python Programming Language?

editAnswer

reportReport

Answer(s) available: 1

Kusagra Merchant

, Sales Representatives (Agricultural Products), Database Vendor Management

"

Don't use a triple-quoted string when you don't want extra whitespace, tabs and newlines.

"

Use implicit continuation, it's more elegant:

"
def f():"
    s = ('123'"
         '456')"
    return s"
"

thumb_upUpvote13

smsComment

reportReport