Traceback (most recent call last):
File "C:/Users/TLCB/PycharmProjects/untitled/xpath/t2.py", line 14, in <module>
print str(z)+'=>'+str(y[z])
UnicodeEncodeError: 'ascii' codec can't encode character u'u2019' in position 50: ordinal not in range(128)
解决:
import sys
reload(sys)
sys.setdefaultencoding('utf8')