Sourcery refactoring id:
Swap variable values with tuple assignment
temp = a a = b b = temp
a, b = b, a
When trying to swap the values held by two variables, we may avoid using an extra temporary variable unnecessarily by employing Python's tuple assignment. As a consequence of this refactoring, the code is not only more concise but also reflects its intention more clearly.