0
Python String question
Why does print(""" "Testing" """) work but print(" "Testing" ") not work? Also print(""" "Testing" """) only works if there is a space between """ and "Testing" ?
2 ответов
+ 3
You can put anything in triple quotes. Not single quotes, you need to escape those characters.
And yup, the interpreter cant tell what youre doing, you have to be clear.
"""" could be " """, "" "", " """, """" or any other combo (I mean, i wrote that and it still looks confusing). The computer doesnt know so you just have to put it in right or use different quotes
+ 1
Thanks, that makes sense!