课程
/后端开发
/Python
/初识Python
#-*- coding: utf-8 -*-
L=[u'英文',100]
print L
输出结果
PS D:\learnpython> python hello.py
[u'\u653f\u4f0a', 100]
2016-08-04
源自:初识Python 4-1
正在回答
第一行代码里告诉Python #-*-coding: utf-8 -*-。你要调用utf 中文。就可以了
L=['英文',100]
print L[0]
#-*- coding: utf-8 -*- L=[u'英文',100] for x in L: print x
#-*- coding: utf-8 -*-和u''二选一
举报
学python入门视频教程,让你快速入门并能编写简单的Python程序
购课补贴联系客服咨询优惠详情
慕课网APP您的移动学习伙伴
扫描二维码关注慕课网微信公众号