Skip to content

Commit f9afa88

Browse files
committed
First commit
0 parents  commit f9afa88

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

remove_character.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
def removeAllOccurrencesOfChar(string,c):
2+
for i in string[:]:
3+
if i==c:
4+
string.remove(i)
5+
else:
6+
i=+1
7+
return "".join(string)
8+
string =[*input()]
9+
c = input()
10+
output = removeAllOccurrencesOfChar(string,c)
11+
print(output)

0 commit comments

Comments
 (0)