>>> print("Hello\nWorld!") & >>> print('Hello\nWorld!') | Sololearn: Learn to code for FREE!

-1

>>> print("Hello\nWorld!") & >>> print('Hello\nWorld!')

Is the output differt for these 2 strings? Diference between using single ' n double " ??

4/8/2018 6:10:56 PM

Danny.P

3 Answers

New Answer

+1

No difference. Both single quotes and double quotes work the same. You just have to make sure you use the same ones together i.e. opening and closing a string with either both single, or both double - not mixing them.

+3

I don't see a difference, you can try it yourself: https://code.sololearn.com/c0U6Sz2dF7Vg/?ref=app

+2

The more interesting thing to try is: print('"Hello World"') print("'Hello World'") That way you can use quotation marks in strings without having to use extra break (backslash).