diff options
Diffstat (limited to 'progs/a374.py')
-rw-r--r-- | progs/a374.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/progs/a374.py b/progs/a374.py new file mode 100644 index 0000000..3b3eabb --- /dev/null +++ b/progs/a374.py @@ -0,0 +1,10 @@ +def remove_Occ(s,ch):
+ for i in range(len(s)):
+ if (s[i] == ch):
+ s = s[0 : i] + s[i + 1:]
+ break
+ for i in range(len(s) - 1,-1,-1):
+ if (s[i] == ch):
+ s = s[0 : i] + s[i + 1:]
+ break
+ return s
\ No newline at end of file |