summaryrefslogtreecommitdiff
path: root/progs/a67.py
diff options
context:
space:
mode:
Diffstat (limited to 'progs/a67.py')
-rw-r--r--progs/a67.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/progs/a67.py b/progs/a67.py
new file mode 100644
index 0000000..842e41b
--- /dev/null
+++ b/progs/a67.py
@@ -0,0 +1,5 @@
+import re
+def replace(string, char):
+ pattern = char + '{2,}'
+ string = re.sub(pattern, char, string)
+ return string \ No newline at end of file