s = "aabbcadcba" print(s.replace("a", "", 1) # removes only one "a" from the string. out -> abbcadcba print(s.replace("a", "") # removes all the "a"s from the string. out -> bbcdcb