class Solution:
def singleNumber(self, nums):
"""
:type nums: List[int]
:rtype: int
"""
stack = []
for i in nums:
if i not in stack:
stack.append(i)
else:
stack.pop(stack.index(i))
print(stack[0])
def singleNumber(self, nums):
"""
:type nums: List[int]
:rtype: int
"""
stack = []
for i in nums:
if i not in stack:
stack.append(i)
else:
stack.pop(stack.index(i))
print(stack[0])