On 14Mar2018 04:08, Steven D'Aprano <steve+comp.lang.pyt...@pearwood.info> 
wrote:
Explain the difference between these two triple-quoted strings:

Here is a triple-quoted string containing spaces and a triple-quote:

py> """ \""" """
' """ '


But remove the spaces, and two of the quotation marks disappear:

py> """\""""""
'"'

"""\"""" ""

Implicit string concatenation of an empty string.

I confess I try to have my quote delimiters distinct from any embedded quotes to avoid wanting backslashes. It is conincidental that my habit tends to sidestep the above issue.

Cheers,
Cameron Simpson <c...@cskk.id.au> (formerly c...@zip.com.au)
--
https://mail.python.org/mailman/listinfo/python-list

Reply via email to