← 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.

Learn the concept first

Stuck on Dictionaries? These free Python lessons teach it step by step.

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