对于python 2:
>>> import urllib2>>> print urllib2.unquote("%CE%B1%CE%BB%20")αλ
对于python 3:
>>> from urllib.parse import unquote>>> print(unquote("%CE%B1%CE%BB%20"))αλ
以下是适用于所有版本的代码:
try: from urllib import unquoteexcept importError: from urllib.parse import unquoteprint(unquote("%CE%B1%CE%BB%20"))
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)