[Tutor] Unicode to Ascii

srinivas devaki mr.eightnoteight at gmail.com
Mon Sep 26 18:16:25 EDT 2016


How can I convert Unicode to Ascii by stripping of any non ascii characters.

one way is to filter on s like

ascii = ''.join(filter(lambda x: 0 <= ord(x) < 256, unicode_string))

but are there any other simple ways ?

Regards
Srinivas Devaki
Senior (final yr) student at Indian Institute of Technology (ISM), Dhanbad
Computer Science and Engineering Department
ph: +91 9491 383 249
telegram_id: @eightnoteight


More information about the Tutor mailing list