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.
Written by Erik Allik
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Python
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#