0
What is the difference between single quote strings and double quote strings?
4 Answers
+ 6
As no language is mentioned so I will assume it to be python
The answer is that there is no difference between single quote and double quote string.
+ 2
Depends on the language. It is much different e.g. in C++ and PHP
+ 1
Syntactically there is no difference any quote can be used for any string .
But If your string has single quote between characters Prefer using double quote for quoting string and vice versa it's just.
+ 1
In some languages like Go, C++ and Java. There is a difference. Single quote indicates a character. Double quote indicates a string.
In PHP, string interpolation can not be done with single quoted strings.
In some other languages like JavaScript and Python, it does not matter.