Horje
python remove \xa0 Code Example
python remove \xa0
# 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!")




Python

Related
regex_2/_regex.c:50:10: fatal error: Python.h: No such file or directory Code Example regex_2/_regex.c:50:10: fatal error: Python.h: No such file or directory Code Example
pythagorean theorem calc: find c, a=n Code Example pythagorean theorem calc: find c, a=n Code Example
Reading Custom Delimited Code Example Reading Custom Delimited Code Example
python convert a dict to list or a list to dict or a slice a dict or sort a dict by key or value without import Code Example python convert a dict to list or a list to dict or a slice a dict or sort a dict by key or value without import Code Example
rounding with .2g gives strange results Code Example rounding with .2g gives strange results Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
8