Reputation: 53
Following is the test string and we need to replace the '\xa' with ''
'FF 6 VRV AVENUE SUBRAMANIYAM PALAYAM PinCode:-\xa0641034'
i was using the following set of lines in python to do the objective but to no use
new_str = str.replace(r'\\xa', '')
but the output is same
'FF 6 VRV AVENUE SUBRAMANIYAM PALAYAM PinCode:-\xa0641034'
Upvotes: 0
Views: 42
Reputation: 4879
I think you are trying to replace the unicode character '\xa0' -
s = 'FF 6 VRV AVENUE SUBRAMANIYAM PALAYAM PinCode:-\xa0641034'
s = s.replace('\xa0', '')
print(s)
#'FF 6 VRV AVENUE SUBRAMANIYAM PALAYAM PinCode:-641034'
Upvotes: 1