Condition For Checking Prime Number Python