Remove Control Character from String

  Kiến thức lập trình

I need to remove a special character from a string but nothing I’ve tried is working. The character is a ‘Â’.

When I used ord() to print the numeric value, it is 194. But when I use the following to remove it from the string, it is not removed:

my_str.replace(chr(194), '')

What am I doing wrong?

1

LEAVE A COMMENT