jwsgnw
Last Updated: February 25, 2016
·
1.398K
· eallik
E49c2e77533477d3c7107f029d9d4b09

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.

Say Thanks
Respond