DekGenius.com
Home
(current)
Dictionary
BOOKS
LYRICS
CHORD
SCRIPT & CODE EXAMPLE
Karaoke language
Search
Go
SCRIPT & CODE EXAMPLE
CODE EXAMPLE FOR PYTHON
python loop through dictionary
d
=
{
'x'
:
1
,
'y'
:
2
,
'z'
:
3
}
for
key
in
d
:
print
key
,
'corresponds to'
,
d
[
key
]
Source by stackoverflow.com #
PREVIOUS
NEXT
Tagged:
#python
#loop
#dictionary
ADD COMMENT
Topic
COMMENT
Name
9+4 =
Submit