Two simple inserts will work just fine:
example_string.insert(-9, '-').insert(-5, '-')
Negative numbers mean that you are calculating from the end of the line. You can also count from the start if you want:
example_string.insert(9, '-').insert(14, '-')
source share