得到一个基于字典上的关键价值的蟒蛇

代码示例

4
0

获得价值和关键从字典蟒蛇

myDict = {
    "message": "Hello Grepper!"
}
for key, value in myDict.items():
    print(key)      #Output: message
    print(value)    #Output: Hello Grepper!

类似页面

带有示例的类似页面

其他语言

此页面有其他语言版本

Русский
..................................................................................................................
English
..................................................................................................................
Italiano
..................................................................................................................
Polski
..................................................................................................................
Română
..................................................................................................................
한국어
..................................................................................................................
हिन्दी
..................................................................................................................
Français
..................................................................................................................
Türk
..................................................................................................................
Česk
..................................................................................................................
Português
..................................................................................................................
ไทย
..................................................................................................................
Español
..................................................................................................................
Slovenský
..................................................................................................................
Балгарскі
..................................................................................................................
Íslensk
..................................................................................................................