Logo

Programming-Idioms

History of Idiom 13 > diff from v62 to v63

Edit summary for version 63 by sparkiegeek:
[Python] Untabify

Version 62

2019-09-26, 17:44:39

Version 63

2019-09-26, 17:58:43

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
Code
for k, v in mymap.items():
	print(k, v)
Code
for k, v in mymap.items():
    print(k, v)