import unicodedata str_hard_space='17xa0kg on 23rdxa0June 2021' print (str_hard_space) xa=u'xa0' if xa in str_hard_space: print("xa0 is Found!") else: print("xa0 is not Found!") 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!")