FareHarbor Interview Question

it was python question to parse comma separated log entries where we need to find open session, completed session and out of session operations: