← All Python interview questions

Extract order IDs from support ticket text

EasyStrings & Text CleaningZohoFreshworks

Support tickets mention order IDs in free text, always in the form ORD- followed by exactly 5 digits.

Write extract_ids(tickets) that takes a list of ticket strings and returns a list of the first order ID found in each ticket, or None when a ticket contains no valid ID.

Practising alone only goes so far — our live cohorts pair Python and Pandas depth with dashboards, agentic analytics projects and mock interviews.

Explore the program