What do you want to save?
Add Code snippet
New code examples
-
Python 2021-10-04 17:38:03
strip unicode characters from strings python
def strip_non_ascii(string): ''' Returns the string without non ASCII characters''' stripped = (c for c in string if 0 < ord(c) < 127) return ''.join(stripped) test = u'éáé123456tgreáé@€' print ... Add solution