userdict = {'User1': {'pass1': 'v1', 'pass2': 'v1'}, 'User2': {'OccPass1':
'v2', 'BtyPass': 'v3'}, 'User3': {'pass3': 'v1'}}
for user in userdict:
print userdict[user].values()
On Oct 26, 2011, at 10:08 AM, woei lee wrote:
> Hi,
>
> how do I get a list from my dict like this
> {'User1': {'pass1': 'v1', 'pass2': 'v1'}, 'User2': {'OccPass1': 'v2',
> 'BtyPass': 'v3'}, 'User3': {'pass3': 'v1'}}
>
>
> to this
>
> ['v1','v1']
>
> or this
>
> ['v2','v3']
>
> Thanks!
> _______________________________________________
> Nuke-python mailing list
> [email protected], http://forums.thefoundry.co.uk/
> http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python
_______________________________________________
Nuke-python mailing list
[email protected], http://forums.thefoundry.co.uk/
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python