0

Does anyone know how to replace a non ascii char in python3? I use as an example but it doesn't work the way I want to, that is to modify the new var as a string.

body = "ALYSS - PYRAMID ♅"
newbody = body.encode('ascii', 'ignore')
Wondercricket
  • 7,651
  • 2
  • 39
  • 58
  • 1
    Does this answer your question? [How to make the python interpreter correctly handle non-ASCII characters in string operations?](https://stackoverflow.com/questions/1342000/how-to-make-the-python-interpreter-correctly-handle-non-ascii-characters-in-stri) – kmoser Jun 22 '22 at 18:58
  • Why did you specify the language for your snippet as HTML? When I click "Run code snippet" it just shows the source code instead of running it. – David Grayson Jun 22 '22 at 18:58

0 Answers0