python中values、keys、items:
>>> dict={1:"one","two":"er",3:"third"}
>>> dict.values()
['one', 'third', 'er']
>>> dict.keys()
[1, 3, 'two']
>>> dict.items()
[(1, 'one'), (3, 'third'), ('two', 'er')]
>>>
python中*args,**args:
>>> def s1(*args):
print args
>>> s1("Zof")
('Zof',)
>>> s1("Zof1","Zof2")
('Zof1', 'Zof2')
//調用參數時,args就是元組>>> def s2(**args):
print args
>>> s2(p1=2,p2="er")
{'p2': 'er', 'p1': 2}
//調用參數時,args就是字典,**將字典擴展爲關鍵字參數,注意s2中是“=”號!