Computer Science, asked by divyansh5622, 5 months ago

replace all occurrences of character ‘r’ with ‘h’ in the String “Programmer”​

Answers

Answered by jai696
2

\huge\red{\mid{\fbox{\tt{Using\: Python\: 3}}\mid}}

replace_char = lambda string, char: "".join(["h" if c == char else c for c in string])

print(replace_char("Programmer", "r"))

\large\mathsf\color{lightgreen}useful?\: \color{white}\longrightarrow\: \color{orange}brainliest!

Similar questions