Exclude all normal alphanumeric character from a mixed chinese-and-alphanumeric character word list
Posted
by
Christine
on Stack Overflow
See other posts from Stack Overflow
or by Christine
Published on 2012-07-04T09:12:55Z
Indexed on
2012/07/04
9:15 UTC
Read the original article
Hit count: 344
I have a list of chinese characters and normal alphanumeric characters, mixed together, and I want to get rid of any element that contains an alphanumeric character. Is there a simple way to do this? If I simply exclude any element that contains an alphanumeric character, I get no result because the chinese characters (in utf-8) are similarly affected.
I also tried
[w for w in fourchar if w.startswith("\x")]
to try to get the chinese characters but I'm not sure if that's valid at all. I'm having difficulty figuring out what the alphanumeric characters are in unicode.
Thanks for any help!
© Stack Overflow or respective owner