Замена подстроки: метод replace()

Синтаксис: строка.replace(что, на_что):

txt = "a-b-c"
print(txt.replace("-", ":"))  # a:b:c