https://www.acmicpc.net/problem/10820
시간 1초, 메모리 256MB
input :
output :
입력 부분이 제일 어렵다 ;;;
몇 줄 까지 입력을 받아라 라는 말이 없기 때문에
try catch를 써서 EOFerror가 발생하면 끝내도록 만들자.
while True:
    try:
        n = input()
        lower, capital, num, space = 0, 0, 0, 0
        for item in n:
            if 65 <= ord(item) <= 90:
                capital += 1
            if 97 <= ord(item) <= 122:
                lower += 1
            if item == ' ':
                space += 1
            if 48 <= ord(item) <= 57:
                num += 1
        print("{} {} {} {}".format(lower, capital, num, space))
    except EOFError:
        break
while True를 써서 계속 반복 시키다가 except에 걸리면 끝나도록.
