Python Insertar texto en la cadena antes de cierto símbolo
my_str = "thisissometextthatiwrote"
substr = "text"
inserttxt = "XX"
idx = my_str.index(substr)
my_str = my_str[:idx] + inserttxt + my_str[idx:]
Fragile Finch