rotate_left(a, b, c) that returns a 3-tuple where each value has shifted one position to the left circularly — the new first slot holds b's original value, the new second holds c's, and the new third holds a's — computed with Python's tuple packing/unpacking assignment (a, b, c = b, c, a) rather than a temporary variable.rotate_left(1, 2, 3)
(2, 3, 1)
a takes b's value, b takes c's, c takes a's original value.
rotate_left('x', 'y', 'z')('y', 'z', 'x')Works the same way for any hashable values.
a, b, c = b, c, a evaluates the whole right-hand tuple before rebinding the names.