seed: curriculum content
This commit is contained in:
16
1.solar-system/3.strings/02.the-slicer/starter/starter.py
Normal file
16
1.solar-system/3.strings/02.the-slicer/starter/starter.py
Normal file
@@ -0,0 +1,16 @@
|
||||
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
|
||||
Reference in New Issue
Block a user