+ 1

Can We use Single quotation in String While Comparing?

8th Aug 2016, 1:35 AM
Kaustav Kumar
Kaustav Kumar - avatar
4 Respostas
+ 4
yes, sure. you can use single as well double quotes. but be careful, if there is a use of an apostrophe in your inverted text, then you must make use of the double quotes because otherwise your character will end then and there when you use the apostrophe because python will take it as the closing inverted quote. so use the double quotes instead. i hope this helps. :)
28th Sep 2016, 2:23 PM
Somya Bhupal
Somya Bhupal - avatar
+ 2
Yes you can use single quation mark while comaparing the string. But its better practise to use double quots to the strings so that we can differentiate them with other i.e char, or some text in the program. Good way to compare.. string s1,s2,s3; gets (s1); gets (s2); strcmp (s1,s2);
24th Jun 2017, 12:52 AM
Saikrishna Thatikonda
Saikrishna Thatikonda - avatar
0
yes we can use!
24th Sep 2016, 5:25 AM
mounika velugubantla
0
yes
4th Nov 2016, 4:23 AM
sonal borkar
sonal borkar - avatar