+ 1
Can We use Single quotation in String While Comparing?
4 Answers
+ 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. :)
+ 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);
0
yes we can use!
0
yes