replace all occurrences of character ‘r’ with ‘h’ in the String “Programmer”
Answers
Answered by
2
replace_char = lambda string, char: "".join(["h" if c == char else c for c in string])
print(replace_char("Programmer", "r"))
Similar questions
English,
3 months ago
Geography,
3 months ago
Computer Science,
7 months ago
Math,
1 year ago
Social Sciences,
1 year ago