[Python] 백준 1157번: 단어 공부
코드 input_str = input() count = [0] * 26 # The number of alphabet alphabet = ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z'] # Counting the alphabets for i in range(len(input_str)): if input_str[i].upper() == 'A': count[0] += 1 elif input_str[i].upper() == 'B': count[1] += 1 elif input_str[i].upper() == 'C': count[..
2023. 5. 17.