← All Python interview questions

Count orders by payment channel

EasyDictionariesPaytmSwiggy

You receive orders as a list of dictionaries and need a quick channel mix breakdown for the daily standup.

Write a function count_by_channel(orders) that returns a dictionary mapping each channel value to the number of orders that used it.

More Dictionaries questions

  • This is the only question on this topic for now.

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