Skip to content

How to find the number of times a number appears in Python?

dict((i, a.count(i)) for i in a)
See also  Python code snippet - How to move mouse ?

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.