I have a list that looks something like this:
co_list = [[387, 875, 125, 822], [397, 994, 135, 941], [397, 994, 135, 941], [397, 994, 135, 941], [397, 994, 135, 941], [1766, 696, 1504, 643]. . . ]
I need to count the number of identical co-ordinates lists and return the count, 4 in this case.
So far I have tried:
def most_common(lst):
lst = list(lst)
return max(set(lst), key=lst.count)
for each in kk :
print most_common(each)
Using which I get the most occurring element in each list. But my intention is to get a list if it's occurrence is more than 3.
Expected Output:
(element, count) = ([397, 994, 135, 941], 4)
Any help would be appreciated. Thanks.