What is the difference between print(" hello " + " world "). And print(" hello " + 'world' ) | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

What is the difference between print(" hello " + " world "). And print(" hello " + 'world' )

4th Feb 2019, 11:39 AM
ansh
ansh - avatar
2 Answers
+ 1
That looks Python alike: So there is no difference.
4th Feb 2019, 12:00 PM
Niush
Niush - avatar
+ 1
In Python the main difference between single quote and double quote strings is that in single quote strings double quotes are automatically escaped and in double quote strings single quote strings are automatically escaped. Correct syntax strings: " ' " ' " ' " \" " ' \' ' Error syntax strings: " " " ' ' '
4th Feb 2019, 12:37 PM
Seb TheS
Seb TheS - avatar