New course! Every coder should learn Generative AI!
Try a free lesson0
What is the difference between print(" hello " + " world "). And print(" hello " + 'world' )
2 Answers
+ 1
That looks Python alike:
So there is no difference.
+ 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:
" " "
' ' '