Computer Science, asked by shubhamsingh7648, 3 months ago

Write a program which takes two inputs one is a string and other is a character. The function should create a new string after deleting all occurrences of the character from the string and return the new string?​

Answers

Answered by jai696
1

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

del_char = lambda string, char: "".join([c for c in string if c != char])

string, char = input("string: "), input("char: ")

print(del_char(string, char))

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

Similar questions