Python Insert Into String Before Substring Meaning