0
What is exact difference in ' ' and " "
difference in ' ' & " "
8 Respostas
+ 13
No difference.
+ 3
That is in python, in other languages ' is used to represent chars and " to represent strings.
For example in c#
'c' is a char, but "c" is a string with length one
+ 2
both are used to include strings, but if you use ' you do not need to escape " and vice verca
For example you can write
"doesn't" instead of 'doesn\'t'
or
'some "name"' instead of "some \"name\""
+ 1
They are pretty much the same, they allow for one the be used inside the other for example:
>>>print('Johnny said "hello"')
Johnny said "hello"
This is for those serious grammar nazis, if you need to use both you can do:
>>>print(""""don't touch Johnny's toys" said mom
"And stay out!"""")
"don't touch Johnny's toys" said mom
"And stay out!"
The three quotation marks can also support multiple lines.
0
both are same ???
0
if you use quotes within quotes you must diversify otherwise no difference
0
no different