MediumAbout 11 minString cleaning
Extract the order id from log lines
A line column holds free-form log lines that may contain order=<id> (e.g. "lvl=info order=ORD1 ok"). Extract the order id from each line; lines with no match yield None.
Return a Python list (id-or-None) in row order.
What the tests check
2 on Run · 3 on Submit01extracts the id, None when absent
02ids of any shape, with other fields after them
Submit runs these and one more check you don’t see, so code written for the visible tests alone can still miss.
Runtime
Python 3.13 in your browser – the standard library plus pandas and numpy; no pip installs.