How to Swap Two Variables in Python a = 5 b = 10 a, b = b, a print(f"After swapping: a = {a}, b = {b}")