Codington
0 of 6 problems solved • 0%

Exercise prompt

Read a Parcel Tag

A slice starts at its first index and stops just before the second. Missing bounds extend to the start or end of the string.

Example

filename = "notes.txt" print(filename[:5]) # notes print(filename[6:]) # txt

Index 5 is the dot. Ending the first slice at 5 and starting the next one at 6 leaves it out.

Your task

The parcel tag has a three-letter depot, a hyphen, and a serial number. Store the lowercase depot in depot and the serial text in serial. Keep its leading zero.