Python list's value histogram

Comments (in chronological order):

Reply to the article

Name:

Your comment:


Enter this:

mato said:...
Zdravím. Skúste ešte v druhom prípade alternatívu:

hist2 = dict()
for x in data:
try:
hist2[x] += 1
except KeyError:
hist2[x] = 1


9/29/2022 7:46