python中的get函数

>>> a={1:'a',2:'b'}
>>> print a.get(1)
a
>>> print a.get(3)
None

posted on 2013-06-25 11:30  语辰  阅读(1223)  评论(0编辑  收藏  举报