Answers for "cancel unicode character python"

0

remove unicode from string python

.encode("ascii", "ignore")
Posted by: Guest on June-03-2020
0

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 test
print strip_non_ascii(test)
Posted by: Guest on September-04-2020

Code answers related to "cancel unicode character python"

Python Answers by Framework

Browse Popular Code Answers by Language