You are viewing a single comment's thread. Return to all comments →
Even simpler and perhaps faster for a huge list:
return max(set(ar), key=ar.count)
Seems like cookies are disabled on this browser, please enable them to open this website
Migratory Birds
You are viewing a single comment's thread. Return to all comments →
Even simpler and perhaps faster for a huge list:
return max(set(ar), key=ar.count)