Logo

Programming-Idioms

History of Idiom 13 > diff from v51 to v52

Edit summary for version 52 by a:
[Python] a

Version 51

2016-11-20, 18:28:26

Version 52

2017-01-16, 20:59:06

Idiom #13 Iterate over map keys and values

Print each key k with its value x from an associative array mymap

Illustration

Idiom #13 Iterate over map keys and values

Print each key k with its value x from an associative array mymap

Illustration
Extra Keywords
table dictionary hash traverse traversal
Extra Keywords
table dictionary hash traverse traversal
Imports
from __future__ import print_function
Imports
from __future__ import print_function
Code
for k, v in mymap.items():
	print(k, v)
Code
for k, v in mymap.items():
	print(k, v)

key = mymap.keys()[0]