runtime
63 / 500
question 63 Lists & Tuples · easy

Order numbers from mixed IDs

An export mixes Runtime Market order IDs (O104839) with retail invoice numbers (C489528). Keep only the IDs that start with O, turn each into its number (104839), and print the list of numbers. Then print the largest of those numbers (the most recent order), or None if there were no order IDs.

Inputids, a list of texts
Line 1a list of the numbers from IDs starting with O, in their original order
Line 2the largest of those numbers, or None
Examples["O100043", "O104839", "C489528", "O101217"] → [100043, 104839, 101217] then 104839; ["C1"] → [] then None
Expected output2 lines
  1. 1[100043, 104839, 101217]
  2. 2104839

Loading your progress…

Order numbers from mixed IDs — Python practice · Runtime