python中dict[key] 存在key,但是报错:KeyError

改为使用:dict.get(key)

posted @ 2015-09-18 15:32  Lindsay_chh  阅读(2156)  评论(1编辑  收藏  举报