pylint-errors

R1712 (consider-swap-variables)

:x: Problematic code:

a = 1
b = 2
temp = a

a = b
b = temp

print(a, b)

:heavy_check_mark: Correct code:

a = 1
b = 2

a, b = b, a

print(a, b)

Rationale:

You do not have to use a temporary variable in order to swap variables. Using tuple unpacking to directly swap variables makes the intention more clear.