Skip to content

Instantly share code, notes, and snippets.

@qingfeng
Created July 9, 2009 15:06
Show Gist options
  • Select an option

  • Save qingfeng/143728 to your computer and use it in GitHub Desktop.

Select an option

Save qingfeng/143728 to your computer and use it in GitHub Desktop.
处理&#开头的中文
s = u'如何面对产痛 '
print "".join( map(lambda x:unichr(int(x.replace("&#",""))),filter(lambda x:x!='',s.strip().split(";"))) )
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment