livepython.net

25. Python Program to Rotate the Values of Three Variables

MediumHow they work

Overview

Rotate values between multiple variables.

Problem Statement

Rotate values between three variables in one operation.

Constraints:

  • Start with a = 1, b = 2, c = 3
  • After rotation: a=2, b=3, c=1
  • Print all three variables after rotation

Input

  • No input required

Output

2 3 1

Learn this firstChapter 4 · How Python Variables Work: Reassign, Swap and More
solution.py
# write your code here

EXPECTED OUTPUT

12 3 1

YOUR OUTPUT

Press Run to see your output here. Lines are compared with the expected output.