📅  最后修改于: 2022-03-11 14:45:53.822000             🧑  作者: Mango
# credit in the source link
import unicodedata
str_hard_space='17\xa0kg on 23rd\xa0June 2021'
print(str_hard_space)
xa=u'\xa0'
if xa in str_hard_space:
print("xa0 is Found!")
else:
print("xa0 is not Found!")
# this is the command you are looking for
new_str = unicodedata.normalize("NFKD", str_hard_space)
print (new_str)
if xa in new_str:
print("xa0 is Found!")
else:
print("xa0 is not Found!")