#-*- coding:utf-8 -*-
from __future__ import unicode_literals
print(type("test")) # output: <type 'unicode'>
spam = "测试字符串"
print(spam[1:3]) # output:试字
转载于:https://blog.51cto.com/1161192890/1369026
#-*- coding:utf-8 -*-
from __future__ import unicode_literals
print(type("test")) # output: <type 'unicode'>
spam = "测试字符串"
print(spam[1:3]) # output:试字
转载于:https://blog.51cto.com/1161192890/1369026