python nested dictionaries loop
<p>Is there a better / cleaner / shorter way of getting the same output as the following?</p>

<pre><code>import plistlib
pl = plistlib.readPlist('/Users/username/Documents/wifi1.plist')

n = len(pl)
count = 0
while (count &lt; n):
    print('----------------')
    print(pl[count]['NOISE'])
    print(pl[count]['RSSI'])
    print(pl[count]['SSID_STR'])
    print(pl[count]['BSSID'])
    count += 1
</code></pre>

<p>I have tried:</p>

<pre><code>for sub_dict in pl.values():
    print(sub_dict['NOISE'], sub_dict['RSSI'], sub_dict['SSID_STR'], sub_dict['BSSID'])
</code></pre>

<p>but I get:</p>

<pre><code>Traceback (most recent call last):
  File "plistread.py", line 17, in &lt;module&gt;
    for sub_dict in pl.values():
AttributeError: 'list' object has no attribute 'values'
</code></pre>
