0

The difference between double and single quotation marks is ( PYTHON)

Using single quotation marks and an apostrophe in the text creates an error as it thinks the text ends at the apostrophe. Double quotations marks prevent this, or you can use a backward slash before the apostrophe like this: input; 'He\'s a coder' and input; "He's a coder'' output for both of them are same output; He's a coder

9th Nov 2017, 1:53 PM
Kyaw Moe Hein
Kyaw Moe Hein - avatar
3 Réponses
+ 2
They are identical in almost everything, the only thing is that you cannot have ' in a string contained by single quotation marks and " in string contained by double quotation marks.
9th Nov 2017, 3:02 PM
Harsh
Harsh - avatar
+ 1
sir you should mention the language in question
9th Nov 2017, 1:55 PM
Uttam
Uttam - avatar
- 1
my false, I forgot it.thanks
9th Nov 2017, 1:57 PM
Kyaw Moe Hein
Kyaw Moe Hein - avatar