Simple check prime code in Python