Off-by-one slice
The cargo system reads the number out of each container tag, like CG-0042, to look the container up in the manifest. Container 42 never shows up, and the log is full of numbers that start with a dash.
Predict what the slice gives, work out where it goes wrong, fix it, then slice a sample tube label yourself.
Finish stage 1 to unlock this stage.
Don't run the code yet. Read it and decide what it will print. Write your guess in prediction, at the top, between the quotes. Then run it and compare.
Any guess passes this stage: the point is to think before you run. After you check, you'll see your prediction next to what Python printed.
Count the positions in CG-0042 carefully before you guess.
Finish stage 1 to unlock this stage.
Investigate. Store the index of the dash in dash_index and the index of the last character in last_index. Check them with the prints in the comments, and remove those lines before you check.
Modify. Fix the slice so it takes the four digits after the dash. It must print:
Container number: 0042
Finish stage 2 to unlock this stage.
Sample tube labels look like SMP-2026-0317-A: SMP, the year, a sequence number and a batch letter. Slice the label to print its parts:
Year: 2026 Sequence: 0317 Batch: A
Count the positions before you write each slice, and remember that the end index isn't included. For the last character, a negative index saves you counting.
Hints
String Indexing and Slicing
# String indexing - every character has a position, counting from 0
mission = "ARTEMIS"
# 0123456
# Grabbing individual characters
print("First letter:", mission[0]) # A
print("Last letter:", mission[-1]) # S
# Slicing [start:stop] - stop is NOT included
print("First three:", mission[0:3]) # ART
print("From index 4 on:", mission[4:]) # MIS
print("Last three:", mission[-3:]) # MIS
# Step slicing [start:stop:step]
launch_code = "A1B2C3D4"
print("Every 2nd:", launch_code[::2]) # ABCD
print("The digits:", launch_code[1::2]) # 1234
# Reversing with a negative step
print("Reversed:", mission[::-1]) # SIMETRA
Separate arguments with commas. They're passed on every Run as sys.argv[1:].