Last Updated: February 25, 2016
·
1.83K
· eallik

Python tuple unpacking tricks a.la Erlang

_, (_, x) = a, (b, (c, d)) = (1, (2, (3, (4, 5, 6))))
...allows one to unpack the same tuple in multiple ways at the same time; this is similar to Erlang but not as concise nor readable.