Find Prime Number Leetcode Python