Skip to content

Commit

Permalink
python2中汉字编码
Browse files Browse the repository at this point in the history
  • Loading branch information
likepython committed Jun 15, 2015
1 parent 149baa9 commit cd65764
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions python_bianma.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,12 @@

###6、字典等key或值的汉字问题
#coding:utf-8
dict1 ={1:'python周末培训班',2:'咨询010-68165761 QQ:1465376564'}
dict1 ={1:'python周末培训班',2:'咨询QQ:1465376564'}

print dict1
# 这样输出的没有显示汉字,是显示汉字的其它编码

dict2 ={1:'python视频培训班',2:'咨询010-68165761 QQ:1465376564'}
dict2 ={1:'python视频培训班',2:'咨询QQ:1465376564'}
for key in dict2:
print dict2[key]

Expand Down

0 comments on commit cd65764

Please sign in to comment.