Track a saved tuple through reassignment

A warehouse program stores two checkpoint counts. It saves the original tuple, reverses the positions by constructing another tuple, and then applies two count corrections:


Python
checkpoints = (12, 18)
saved = checkpoints
checkpoints = (checkpoints[1], checkpoints[0])
checkpoints = (checkpoints[0] + 5, checkpoints[1] + 2)


After all four lines run, give the first count in checkpoints, the second count in checkpoints, and the first count in saved. Enter each count as an exact whole number.

Your answers

Create a free account to get started

Unlock full course notes by signing up

  • Video lessons taught by top educators
  • Practice questions with guided solutions
  • Written review notes for reference
  • Expert answers anytime from course tutors

More Tuples Questions: