Reindexing a rebuilt warehouse label

A warehouse program replaces the three-digit section of a label with a two-digit section, then creates two display strings. Trace the following Python code.


Python
tag = "lot:ab-304-xy"
revised = tag[:7] + "91" + tag[10:]
display = revised[4:].replace("-", "").upper()
audit = revised[-2:3:-2].upper()
size = len(revised)


Enter the exact values of display and audit, without quotation marks and with matching capitalization. Also enter size as an exact integer number of characters.

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 String Slicing and Methods Questions: