One case where you need to include more structure on the left side of the job is when you ask Python to unpack a slightly more complex sequence. For example:.
This has proved useful to me in the past, for example, when using an enumeration to iterate over a sequence of 2 tuples. Something like:
>>> d = { 'a': 'x', 'b': 'y', 'c': 'z' } >>> for i, (key, value) in enumerate(d.iteritems()): ... print (i, key, value) (0, 'a', 'x') (1, 'c', 'z') (2, 'b', 'y')
Will McCutchen Mar 03 2018-11-11T00: 00Z
source share