Contains Duplicate Leetcode Python Beginner