Ad
Code
Diff
  • from collections import Counter
    
    def FindOnly(values):
        return Counter(values).most_common()[::-1][0][0]
    • from collections import Counter
    • def FindOnly(values):
    • items = Counter(values)
    • for item in items:
    • if items[item] == 1:
    • return item
    • return Counter(values).most_common()[::-1][0][0]