Python Check String Prefix Definition