Is it possible to insert to a list when a specific string appears. Example:
List=['north','south','east','west','south','united']
So for every time the string 'south' is presented the list will be insert an item 'canada'
before the element south in the list.
Results
List=['north','canada','south','east','west','canada','south','united']
EDIT: I apologize for not being specific enough. I need it to seek the specific characters.
List1=['north','<usa>23<\usa>','east','west','<usa>1942<\usa>','united']
Result=['north','canada', '<usa>23<\usa>','east','west','canada','<usa>1942<\usa>','united']