String and double strings | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

String and double strings

whats is the diffrent of them.im try print "house" and print 'house' both of them working.but im sure there is a diffrent.

14th Apr 2017, 3:02 AM
Kevin AS
Kevin AS - avatar
2 Answers
+ 8
In Python there is no difference between them. In other languages 'C' is a char variable, whereas "C" is a string variable However, I would recommend to stick to the same pattern, for two reasons: 1)To visually separate between chars and strings 2)Because in your outputs you will use apostrophes more often than double quotations, that\'s why you would get annoyed putting backslashes before every apostrophe
14th Apr 2017, 3:12 AM
Dinmukhamed Mailibay
Dinmukhamed Mailibay - avatar
0
good answer thanks
14th Apr 2017, 3:15 AM
Kevin AS
Kevin AS - avatar