Python not the prettiest


#1

class Solution:
# @param A : tuple of integers
# @return an integer
def singleNumber(self, A):
a = sorted(A)
lastone = int
end = len(a)-1
for i in range(end):
if a[i] != a[i + 1] and a[i] != lastone:
return(a[i])
else:
lastone = a[i]
return(a[end])