Eryk Sun <[email protected]> added the comment:
> assert '''"""''' == '""""' # Fails
The left-hand side is a triple-quote string literal [1][2] that contains 3
double-quote characters. The right-hand side is a single-quote string literal
that contains 4 double-quote characters. Use the interactive shell to check the
values. For example:
>>> list('''"""''')
['"', '"', '"']
>>> list('""""')
['"', '"', '"', '"']
If you have difficulty understanding an aspect of the language syntax, please
ask a question in an appropriate forum such as python-tutor, python-list, or
Stack Overflow.
---
[1]
https://docs.python.org/3/reference/lexical_analysis.html#string-and-bytes-literals
[2] https://docs.python.org/3/tutorial/introduction.html#strings
----------
nosy: +eryksun
resolution: -> not a bug
stage: -> resolved
status: open -> closed
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue42876>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com