为什么分数不能作为key
>>> d={
... 95:'Adam',
... 85:'Bart'
... }
>>> for key in d:
... print key + ':',d[key]
...
Traceback (most recent call last):
File "<stdin>", line 2, in <module>
TypeError: unsupported operand type(s) for +: 'int' and 'str'
抛开题目的name:score格式不谈,是分数不能为key,还是我个人操作错误