From 707f59fc6094cbe433a164008ab730a4f0a463f2 Mon Sep 17 00:00:00 2001 From: HyeGyeong Kook <84006880+k0000k@users.noreply.github.com> Date: Tue, 14 Feb 2023 21:15:45 +0900 Subject: [PATCH] =?UTF-8?q?=20Sol:=20[BOJ]=2010820=20=EB=AC=B8=EC=9E=90?= =?UTF-8?q?=EC=97=B4=20=EB=B6=84=EC=84=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- String/10820.py | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 String/10820.py diff --git a/String/10820.py b/String/10820.py new file mode 100644 index 0000000..ead8128 --- /dev/null +++ b/String/10820.py @@ -0,0 +1,25 @@ +import sys + +while (True): + try: + word = input() + + small = 0 + big = 0 + num = 0 + space = 0 + + for i in word: + if (i.isalpha()): + if (97 <= ord(i) <= 122): + small += 1 + else: + big += 1 + elif (i.isdigit()): + num += 1 + else: + space += 1 + + print(small, big, num, space) + except: + sys.exit()