基础DAY13-文本编码

  

python2 字符串

# *-* coding:utf8 *-*
# 引号前面的u告诉解释器这是一个utf8编码格式的字符串
hello_str = u"hello世界"
print(hello_str)
for c in hello_str:
print(c)

 

posted @ 2019-08-27 18:46  才华配得上梦想  阅读(121)  评论(0编辑  收藏  举报