Here is one of those little things that make me love Python:
d = {'a': (1,2), 'b': (3,4)}
for k, (a, b) in d.items():
print k, a, b
Prints:
a 1 2
b 3 4
How cool is that? 😉
Here is one of those little things that make me love Python:
d = {'a': (1,2), 'b': (3,4)}
for k, (a, b) in d.items():
print k, a, b
Prints:
a 1 2
b 3 4
How cool is that? 😉
This website uses cookies. More info in the privacy policy.