lst = [1,3,3,2,2,2,4,4] ans = {} for i in lst: if i in ans: ans[i] += 1 else: ans[i] = 1 print(max(ans,key = ans.get))
To embed this project on your website, copy the following code and paste it into your website's HTML: