Python返回功能
天天开心学编程 人气:0第一个:神奇的字典键
some_dict = {} some_dict[5.5] = "Ruby" some_dict[5.0] = "JavaScript" some_dict[5] = "Python"
Output:
>>> some_dict[5.5] "Ruby" >>> some_dict[5.0] "Python" >>> some_dict[5] "Python"
"Python" 消除了 "JavaScript" 的存在?
加载全部内容