Skip to main content
Improved formatting
Source Link
MendelG
  • 20.6k
  • 5
  • 38
  • 68

I have a list like this: [5,6,7,2,4,8,5,2,3]

[5,6,7,2,4,8,5,2,3] 

and iI want to check how many times each element exists in this list.

what is the best way to do it in Python?

I have a list like this: [5,6,7,2,4,8,5,2,3]

and i want to check how many times each element exists in this list.

what is the best way to do it in Python?

I have a list like this:

[5,6,7,2,4,8,5,2,3] 

and I want to check how many times each element exists in this list.

what is the best way to do it in Python?

Post Closed as "Duplicate" by jscs, Ashwini Chaudhary, dm03514, roippi, Szymon
Source Link
g0str1d3r
  • 116
  • 1
  • 1
  • 11

How to check how many times an element exists in a list

I have a list like this: [5,6,7,2,4,8,5,2,3]

and i want to check how many times each element exists in this list.

what is the best way to do it in Python?