Python Function To Separate String In Particular Indexes