📜  python 字符串删除重音 - Python 代码示例

📅  最后修改于: 2022-03-11 14:46:08.007000             🧑  作者: Mango

代码示例1
def convert_to_non_accent(string):
    """ Function to convert accent characters to non accent
    characters.
    :param string: String to be converted.
    :type string: str
    :return: str
    """
    return ''.join(ch for ch in unicodedata.normalize('NFKD', string)
                   if not unicodedata.combining(ch))