def str_count(s):
    '\n    Count the number of Chinese characters,\n    a single English character and a single number\n    equal to half the length of Chinese characters.\n    args:\n        s(string): the input of string\n    return(int):\n        the number of Chinese characters\n    '
    import string
    count_zh = count_pu = 0
    s_len = len(s)
    en_dg_count = 0
    for c in s:
        if ((c in string.ascii_letters) or c.isdigit() or c.isspace()):
            en_dg_count += 1
        elif c.isalpha():
            count_zh += 1
        else:
            count_pu += 1
    return (s_len - math.ceil((en_dg_count / 2)))
Count the number of Chinese characters,
a single English character and a single number
equal to half the length of Chinese characters.
args:
    s(string): the input of string
return(int):
    the number of Chinese characters
def str_count(s):
    '\n    Count the number of Chinese characters,\n    a single English character and a single number\n    equal to half the length of Chinese characters.\n    args:\n        s(string): the input of string\n    return(int):\n        the number of Chinese characters\n    '
    import string
    count_zh = count_pu = 0
    s_len = len(s)
    en_dg_count = 0
    for c in s:
        if ((c in string.ascii_letters) or c.isdigit() or c.isspace()):
            en_dg_count += 1
        elif c.isalpha():
            count_zh += 1
        else:
            count_pu += 1
    return (s_len - math.ceil((en_dg_count / 2)))