Cai Gengyang wrote:

> Strange, it gives me an error message when i type result["jordan"] or
> result[max(result)] though :
> 
>>>> results = {
>   "gengyang": 14,
>   "ensheng": 13,
>   "jordan": 12
> }
> 
>>>> result["jordan"]
> Traceback (most recent call last):
>   File "<pyshell#27>", line 1, in <module>
>     result["jordan"]
> NameError: name 'result' is not defined

Yeah, the error message really should be

"NameError: name 'result' is not defined; did you mean 'results'?"

;)

-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to