Find Single Element Leetcode Python