I have following line in my code:
if "♠" in text:
do_something()
When working no some UTF-16 encoded text files. It works but it looks kind of silly (to me). Is there any way to write something along the lines of "\code for this character here" instead so it works on text data opened with UTF-16 encoding ? Also how do I go around using this in regex ? Say I want to match every line beginning with ♠ or ♥ symbol.
Thanks for help :)