Hey everybody, while practicing python, it attracted my attention, that it is possible to use either ' ...' or " ..." to define a string element, is there a real difference ?
No, not really. Personally, I prefer to use
"", but plenty of others use
''. It is purely a matter of personal preference.
no, there isn't.
The only thing is when you want to use an apostrophe in your string you better use quotation marks:
otherwise you need to escape the
'that\'s not better'
same for if you want to use quotation mark in string, use apostrophe to mark beginning and end of string
Thank you very much
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.