Simplify replace_strings_by_objects to avoid a possible bug

3 jobs for topic/default/fix-bug-replace_strings_by_objects in 9 minutes and 22 seconds
Status Name Job ID Coverage
  Test
passed step_pythran_cython #79638

00:07:43

passed step_pythran_then_cython #79637

00:09:22

passed step_without_pythran #79636

00:03:35