Get the number which appears the most in an array of number?

Hello !
As I said in the title, I have an array like this:
[7, 8, 22, 23, 16, 2, 10, 11, 24, 8, 2, 4, 27,8,9,8]
And I want to get the number which appeared the most
here it should be 8

But I have no idea how to do that 0o

(It’s actually for my personnal project, anime list, where 8 = action and 23 = drama for example, so here the man’s favorite genre is Action so I’m trying to add :“Favorite genre: Action”

Some help would be very appreciated :(, thanks !

DOne !

I just dont know how to write what I really need lol.
np.bincount(genres).argmax()

You can define a function as follows:

from collections import Counter

def most_com(array):
count = Counter(array)
result = count.most_common(1)
return [x[0] for x in result][0]

“”“It works on my System!”“”