Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

find frequency of numbers in list python

from collections import Counter

def frequency_table(n):
    table = Counter(n)
    print('Number	Frequency')
    for number in table.most_common() :
        print('{0}	{1}'.format(number[0], number[1]))
        
# src : Doing Math With Python
Source by buggyprogrammer.com #
 
PREVIOUS NEXT
Tagged: #find #frequency #numbers #list #python
ADD COMMENT
Topic
Name
4+5 =