First time here? Checkout the FAQ!
x
+1 vote
388 views
asked in Python by (1.1k points)  
Is there any big difference between ingle quotation (' ') and double ("") quotation in Python?
  

1 Answer

+2 votes
answered by (1k points)  

A string as a sequence of characters not intended to have numeric value. In Python, such sequence of characters is included inside single or double quotes. As far as language syntax is concerned, there is no difference in single or double quoted string. Both representations can be used interchangeably. However, if either single or double quote is a part of the string itself, then the string must be placed in double or single quotes respectively.

For example a text Hello “Python” is to be stored as a string, then one should use:

str1='Hello "Python"'

On the other hand, if string should resemble Hello ‘Python’ then it should be declared as follows:

Str2="Hello 'Python'"

source

...