0

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'

1 Answer 1

1

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'
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.