Leetcode Check If A Number Is Prime Or Not In Python