编码问题,如果是python2 需要在顶部添加 # *-*coding:utf-8 -
#!/usr/bin/env python # *-*coding:utf-8 *-* s = '中国' print(type(s))