Python solution if someone could not understand XOR concept


#1
    A=sorted(A)
    i=0
    j=1
     while (j<len(A)):
        if A[i]==A[j]:
            i=j+1
            j=j+2
            
        else:
            return A[i]
            
    else:
         return A[i]