Files
curriculum/1.solar-system/3.strings/02.the-slicer/starter/starter.py

17 lines
446 B
Python

def extract(header):
"""Extract date and time from a fixed-format packet header.
Header format (always exactly this shape):
TIMESTAMP=YYYY-MM-DDTHH:MM:SSZ
Length 30. Example:
TIMESTAMP=2026-05-04T14:32:01Z
Return a tuple (date, time) where:
date = "YYYY-MM-DD" (10 chars)
time = "HH:MM:SS" (8 chars)
extract("TIMESTAMP=2026-05-04T14:32:01Z")
-> ("2026-05-04", "14:32:01")
"""
pass