unicodedata.lookup()
unicodedata.lookup() is a Python function in the Unicodedata Module category. Looks up a Unicode character by its standard name. The syntax is unicodedata.lookup(name). Parameters: name — Unicode character name. Returns: Character string. A typical example: import unicodedata
unicodedata.lookup("SNOWMAN") # "\u2603"
unicodedata.lookup("LATIN SMALL LETTER A") # "a". A close sibling is unicodedata.name(), which returns the Unicode name of a character. A close sibling is unicodedata.normalize(), which normalizes a Unicode string (NFC, NFKC, NFD, NFKD) for comparison. A close sibling is unicodedata.category(), which returns the general category of a Unicode character (Lu, Ll, Nd, etc.). A close sibling is unicodedata.bidirectional(), which returns the bidirectional class of a Unicode character. More about this category: Unicode database — lookup, name, normalize, category, decimal. Related Unicodedata Module entries: unicodedata.name(), unicodedata.normalize(), unicodedata.category(), unicodedata.bidirectional(), unicodedata.decimal(), unicodedata.numeric(). This page is part of the free Python Reference documentation covering 978+ functions, methods, and modules with examples and parameter details.