def count_frequency(lst): 
    frequency = {}
    for i in lst: 
        if i in frequency: 
            frequency[i] += 1
        else: 
            frequency[i] = 1
    
    return frequency

# Driver Code
lst = [2, 3, 4, 5, 6, 4, 3, 5, 7]
print(count_frequency(lst))

Output: {2: 1, 3: 2, 4: 2, 5: 2, 6: 1, 7: 1}
[2, 3, 4, 5, 6, 4, 3, 5, 7]
Per un dato elenco di numeri, trova la frequenza di ciascun numero.