string = "this is a test" replaced = string.replace(' ', '-') print(replaced) string2 = "hello, world"[-7::-1] print(string2)