Programming languages: the difference between the single and double quotes

python single and double quotes distinction:

No difference

c/shell 里

When a single quote '' surrounded by the value of the variable, which is what the single quotation marks on what output, even if the contents of variables and command (command to cause the required trans) also is output them. This embodiment is suitable for the definition of display plain string conditions, i.e. undesired analytical variables, command the scene or the like.

Double quotes "" values surrounding the variable will be output to parse the inside of variables and commands , rather than double quotation marks in the variable name and the command is output. This approach is more suitable strings accompanied by variable and command and you want to define and then parse the output variables.

Published 216 original articles · won praise 33 · views 90000 +

Guess you like

Origin blog.csdn.net/paulkg12/article/details/104816327