Single Number Solutions in PythonNumber 136Difficulty EasyAcceptance 65.6%Link LeetCodeOther languages C++, GoSolutionsPython solution by pezy/LeetCodeclass Solution: def singleNumber(self, nums): """ :type nums: List[int] :rtype: int """ single = 0 for num in nums: single ^= num return single # testif __name__ == '__main__': print(Solution().singleNumber([2, 4, 5, 4, 5, 2, 6, 7, 7]))class Solution: def singleNumber(self, nums): """ :type nums: List[int] :rtype: int """ single = 0 for num in nums: single ^= num return single # test if __name__ == '__main__': print(Solution().singleNumber([2, 4, 5, 4, 5, 2, 6, 7, 7]))