Extended tuple unpacking in Python 2
You can’t do that directly, but it isn’t terribly difficult to write a utility function to do this: >>> def unpack_list(a, b, c, *d): … return a, b, c, d … >>> unpack_list(*range(100)) (0, 1, 2, (3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, … Read more