0

Difference between double qoute string and single qoute string ??

" " and ' '

20th May 2018, 5:26 AM
Prangshuman Goswami
Prangshuman Goswami - avatar
2 ответов
+ 8
Linking the manual: https://docs.python.org/2.0/ref/strings.html and the SO thread for conventions at single vs double quotes strings. https://stackoverflow.com/questions/56011/single-quotes-vs-double-quotes-in-python
20th May 2018, 5:34 AM
Hatsy Rei
Hatsy Rei - avatar
+ 5
If you have a string that also requires quotes (example = a database query string), it's best to use double-quotes with single quotes being used between them. Otherwise, you'd have to character-escape every quotation-mark within the double/single quotes.
20th May 2018, 6:36 AM
Fox
Fox - avatar