250x250
Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | ||||
4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 | 12 | 13 | 14 | 15 | 16 | 17 |
18 | 19 | 20 | 21 | 22 | 23 | 24 |
25 | 26 | 27 | 28 | 29 | 30 | 31 |
Tags
- date_format
- 파이썬 슬라이싱
- where
- Len
- count
- html
- 설계
- Join
- 슬라이싱
- 데이터
- 프로젝트
- Python3
- 백준
- 아이엠어바텐더
- css
- List Comprehension
- 파이썬
- sql
- map
- pcce 기출문제
- GIT
- 단어 공부
- SQL 고득점 Kit
- 프로그래머스
- 코딩테스트 연습
- ORDER BY
- 파이썬 몫
- YOLOv5
- Django
- python
Archives
- Today
- Total
목록파이썬 대문자 소문자 (1)
nan + nan = 2nan

코드 입력 word = input() # 알파벳 정보를 담을 dictionary alpha_dict = {} while True: # 단어의 가장 첫 음절 alpha = word[0] # 음절 대문자와 소문자 개수 파악 cnt = word.count(alpha.upper()) + word.count(alpha.lower()) # 딕셔너리에 삽입 alpha_dict[alpha.upper()] = cnt # 해당 음절 대문자 및 소문자 제거 word = word.replace(alpha.upper(), '').replace(alpha.lower(), '') # 단어 길이가 1 미만일때까지 반복 if len(word) > 1: continue else: break # 딕셔너리의 값 중 가장 큰 값 max_va..
Python/백준 알고리즘
2024. 3. 2. 16:40