class Solution(object):

    def singleNumber(self, nums):
        """
        :type nums: List[int]
        :rtype: int
        """
        num_dict = {}
        for num in nums:
            if num in num_dict:
                num_dict[num] = True
            else:
                num_dict.setdefault(num, False)
        for key in num_dict:
            if not num_dict[key]:
                return key

ea925a2114dc4541b846c16d89235249cb35da4b
<mask token>

class Solution(object):
    <mask token>

class Solution(object):

    def singleNumber(self, nums):
        """
        :type nums: List[int]
        :rtype: int
        """
        num_dict = {}
        for num in nums:
            if num in num_dict:
                num_dict[num] = True
            else:
                num_dict.setdefault(num, False)
        for key in num_dict:
            if not num_dict[key]:
                return key
