+ 2

What's the difference between 'hello' and "hello"?

30th Oct 2017, 9:15 AM
soheilshz
soheilshz - avatar
6 Answers
+ 7
there are no difference between them..in python.. u can use both in Python.. example: print("kazi") print('kazi') both example is Right. u can use any of them.... but u can't use.... print("kazi') this way.... u have to use one type quote ( 'kazi' or "kazi" )
30th Oct 2017, 9:55 AM
KĂ€zĂź MrĂźdĂčl HĂžssÀßn
KĂ€zĂź MrĂźdĂčl HĂžssÀßn - avatar
+ 4
@David Stark: Nope: it's depends of the specific languages... For example, in Php, there's also a difference between single and double quoted string, but in the way there are parsed (double quoted string can embed Php variables as placeholder).
30th Oct 2017, 10:29 AM
visph
visph - avatar
+ 3
in java these are "strings" and these are 'chars' im assuming its the same for python..
30th Oct 2017, 9:31 AM
D_Stark
D_Stark - avatar
+ 3
@ visph 👍
30th Oct 2017, 10:35 AM
D_Stark
D_Stark - avatar
+ 3
'hello' is not true only a char into 'h', "hello" is true becuse string
21st Dec 2017, 4:29 PM
Abolfazl_Tak
Abolfazl_Tak - avatar