Quotes

String Quotes


Single and Double Quotes

String literals can be enclosed in either two single or two double quotes. The reason for this is so you can use one type inside the other to print out the inner quote. Even though you could use an escape sequence to do the same, this option is still available.

Concatenation

You can concatenate adjacent string literals. You can put a "+" between them, or wrap them in parenthesis allowing to span multiple lines.

Triple Quotes

A multiline text data that can be of as many lines as you need. It can be either double quotes """ """ or single quotes ''' '''. Single or double quotes inside the triple quote do not have to be escaped, but can be. It is useful for error messages. HTML code as strings, documentation, disable partial code temporarily.