Lonely Integer

  • + 0 comments
    from collections import Counter
    def lonelyinteger(a):
        # Write your code here
        data = Counter(a)
        unique_elements = [key for key, value in data.items() if value == 1]
        print(unique_elements[0])
        return unique_elements[0]