成免费的crm,久久国产精品新农夫导航新妓网,恋夜秀场全部视频安卓手机,女校花强奷在线播放A级

Python 字典 Dictionary values()方法

Python 字典 Dictionary values()方法

Python 字典 DictionaryPython 字典 Dictionary

Python 字典(Dictionary) values() 函數以列表返回字典中的所有值。

 

語法

values()方法語法:

dict.values()

 

參數

  • NA。

 

返回值

返回字典中的所有值。

 

實例

以下實例展示了 values()函數的使用方法:

#!/usr/bin/python

dict = {'Name': 'Zara', 'Age': 7}

print "Value : %s" %  dict.values()

以上實例輸出結果為:

Value : [7, 'Zara']

Python 字典 DictionaryPython 字典 Dictionary

下一節:Python 字典(Dictionary) pop()方法

Python 教程

相關文章