summaryrefslogtreecommitdiff
path: root/progs/unparsable_programs/a227.py
diff options
context:
space:
mode:
Diffstat (limited to 'progs/unparsable_programs/a227.py')
-rw-r--r--progs/unparsable_programs/a227.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/progs/unparsable_programs/a227.py b/progs/unparsable_programs/a227.py
new file mode 100644
index 0000000..0143995
--- /dev/null
+++ b/progs/unparsable_programs/a227.py
@@ -0,0 +1,10 @@
+def count_alpha_dig_spl(string):
+ alphabets=digits = special = 0
+ for i in range(len(string)):
+ if(string[i].isalpha()):
+ alphabets = alphabets + 1
+ elif(string[i].isdigit()):
+ digits = digits + 1
+ else:
+ special = special + 1
+ return (alphabets,digits,special) \ No newline at end of file