今日碰到一中文字符无法打印的error
words = {'int':'整型','float':'单精度浮点型','double':'双精度浮点型'}
print('int: '+words['int'])
'utf-8' code can't decode byte 0xd5 in position 0: invalid continuation byte
在前面加上 # -*- coding: gbk -* 即可成功打印.
# -*- coding: gbk -*
words = {'int':'整型','float':'单精度浮点型','double':'双精度浮点型'}
print('int: '+words['int'])