1 class Solution: 2 def singleNumber(self, nums: 'List[int]') -> int: 3 dic = {} 4 for n in nums: 5 if n not in dic: 6 dic[n] = 1 7 else: 8 dic[n] += 1 9 for k,v in dic.items(): 10 if v == 1: 11 return k