Extract Integer From String Python Functions