Python版本:2.7.13lis=['1','2','3']tuple(lis)print lislis[0]='999'print lis[0]print lis这么转换成元组,结果竟然可以赋值;tu=(1,2,3,4)print tutu[0]=9print tu直接创建元组,赋值确是不行的#coding=utf-8di={'风':'林','火':'山'}print diprint di['风']F:\Python27\python.exe F:/Users/Syke/.PyCharm2017.1/config/scratches/scratch.py{'\xe7\x81\xab': '\xe5\xb1\xb1', '\xe9\xa3\x8e': '\xe6\x9e\x97'}林Process finished with exit code 0打印所有字典中文乱码,打印单个元素却正常的?
添加回答
举报
0/150
提交
取消