Right now I am using the classic counting of occurences in a list
max(lst,key=lst.count) but if there is a tie in the maximum occurences of two different elements e.g lst = [1,1,2,2], max returns only one element. In our example it will return 1 or 2 . But I need a function which will return both 1 and 2.