Q. Write a function deleteChar() which takes two parameters-one is a string and the 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.
Answer =
def deleteChar(string, char) :
str = ""
for i in string :
if i == char :
continue
else :
str += i
return str
Very good
ReplyDeleteThankyou so much : )
DeleteThankYou
ReplyDeletePost a Comment
You can help us by Clicking on ads. ^_^
Please do not send spam comment : )