⬅︎ Back to is is not the same as equal in Python
"peter" in u"peter" and viceversa will do also.I don´t know if this would be better (performance wise) than use "==". I do know "==" have a little extra overhead versus "is". But in the case of "in" would be good to see which one perform better.
Comment
"peter" in u"peter" and viceversa will do also.
I don´t know if this would be better (performance wise) than use "==". I do know "==" have a little extra overhead versus "is". But in the case of "in" would be good to see which one perform better.