How to escape unicode (non-ASCII) characters into escaped unicode characters in Python

1 Answer

0 votes
s = "AbcüJdfhǟy"
print(s)
 
print(ascii(s))




  
'''
run:
   
AbcüJdfhǟy
'Abc\xfcJdfh\u01dfy'
  
'''

 



answered Nov 8, 2018 by avibootz
edited Apr 24, 2021 by avibootz
...