Lonely Integer

  • + 0 comments

    Python solution, more basic programming

    def lonelyinteger(a):
        # Write your code here
        x = 0
        for i in a:
            for n in a:
                if n == i:
                    x += 1
            if x != 1:
                x = 0
            else:
                return(i)