Compare adjacent numbers, skipping every other one. Since there's only one non-duplicate, we can return at the first instance of non-match. Assuming there's always a non-duplicate, we'll end up on the last element of the list eventually. If we get that far, its our non-duplicate.

class Solution:
def singleNonDuplicate(self, nums):
"""
:type nums: List[int]
:rtype: int
"""
current = 0
while True:
if current == len(nums) - 1 or nums[current] != nums[current + 1]:
return nums[current]
current += 2