I want to check whether the given string is single- or double-quoted. If it is single quote I want to convert it to be double quote, else it has to be same double quote.
The difference is only on input. They are the same.
s = "hi" t = 'hi' s == t
True
You can even do:
"hi" == 'hi'
Providing both methods is useful because you can for example have your string contain either ' or " directly without escaping.
'
"