def visible_length(unistr):
    """Returns the number of printed characters in a Unicode string."""
return len([char for char in unistr if unicodedata.combining(char) == 0])
How do you get the display width of combined Unicode characters in Python 3?