summaryrefslogtreecommitdiff
path: root/progs/a1.py
diff options
context:
space:
mode:
Diffstat (limited to 'progs/a1.py')
-rw-r--r--progs/a1.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/progs/a1.py b/progs/a1.py
new file mode 100644
index 0000000..e229860
--- /dev/null
+++ b/progs/a1.py
@@ -0,0 +1,5 @@
+def first_repeated_char(str1):
+ for index,c in enumerate(str1):
+ if str1[:index+1].count(c) > 1:
+ return c
+ return "None" \ No newline at end of file