Why I love Python – Expressiveness


Wed 08 October 2014

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? 😉


Share: