954,557 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Frequency of items in a list

Hi,
How do I find the frequency of each item in a list in Python?

For example if there are five 'apple', two 'banana', and so on in the list, how do I write a program so that it displays the item as well as the number of times it occurs in the list. Thanks

king_koder
Light Poster
26 posts since Oct 2010
Reputation Points: 10
Solved Threads: 2
 

See this link . The same question (summing items) was asked 2 days ago.

woooee
Nearly a Posting Maven
2,454 posts since Dec 2006
Reputation Points: 777
Solved Threads: 714
 

This question has already been solved

Post: Markdown Syntax: Formatting Help
You
View similar articles that have also been tagged: