Leetcode Unique Element In Python