久久久久久久视色,久久电影免费精品,中文亚洲欧美乱码在线观看,在线免费播放AV片

<center id="vfaef"><input id="vfaef"><table id="vfaef"></table></input></center>

    <p id="vfaef"><kbd id="vfaef"></kbd></p>

    
    
    <pre id="vfaef"><u id="vfaef"></u></pre>

      <thead id="vfaef"><input id="vfaef"></input></thead>

    1. 站長(zhǎng)資訊網(wǎng)
      最全最豐富的資訊網(wǎng)站

      python items()方法如何使用

      python items()方法如何使用

      python items()方法如何使用?

      Python 字典(Dictionary) items()方法

      Python 字典(Dictionary) items() 函數(shù)以列表返回可遍歷的(鍵, 值) 元組數(shù)組。

      推薦:《Python教程》

      語(yǔ)法

      items()方法語(yǔ)法:

      dict.items()

      參數(shù)

      NA。

      返回值

      返回可遍歷的(鍵, 值) 元組數(shù)組。

      以下實(shí)例展示了 items()函數(shù)的使用方法:

      實(shí)例(Python 2.0+)

      #!/usr/bin/python # coding=utf-8   dict = {'Google': 'www.google.com', 'Runoob': 'www.php.cn', 'taobao': 'www.taobao.com'}   print "字典值 : %s" %  dict.items()   # 遍歷字典列表 for key,values in  dict.items():     print key,values

      以上實(shí)例輸出結(jié)果為:

      字典值 : [('Google', 'www.google.com'), ('taobao', 'www.taobao.com'), ('Runoob', 'www.php.cn')] Google www.google.com taobao www.taobao.com   php www.php.cn

      贊(0)
      分享到: 更多 (0)
      網(wǎng)站地圖   滬ICP備18035694號(hào)-2    滬公網(wǎng)安備31011702889846號(hào)