您的位置:首页 > 编程语言 > Python开发

python列表无法显示中文处理

2015-01-08 00:00 399 查看
摘要: python 中文列表

#coding=utf-8
#!D:\gitworkspace\Python\pythonLearn
city = ['中国','湖北','武汉','027'];
lstring = '';
for item in city:
if city[-1] == item:
lstring += '%s' % item;
else:
lstring += '%s, ' % item;
print lstring;

for m in city:
print m.decode('utf-8').encode('utf-8');
for i in city:
print str(i)
raw_input("click'Enter'out");


内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  pythonlist列表