136. Single Number

Given a non-empty array of integers nums, every element appears twice except for one. Find that single one. Implement a solution with a linear runtime complexity and without using extra memory.

class Solution:
    def singleNumber(self, nums: List[int]) -> int:
        return reduce(xor, nums)