# Solution with a temporary variable a = input("Enter variable a: ") b = input("Enter variable b: ") print(f"Variable a is {a}: ") print(f"Variable b is {b}: ") c = a a = b b = c print(f"Variable a is now {a}: ") print(f"Variable b is now {b}: ")
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter