Notice
Recent Posts
Recent Comments
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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
- 백준
- ChatGPT
- programmers
- github
- 캐치카페
- ubuntu
- 맥북
- Kaggle
- Docker
- gs25
- AI 경진대회
- 파이썬
- hackerrank
- 금융문자분석경진대회
- SW Expert Academy
- dacon
- 데이콘
- Baekjoon
- leetcode
- 편스토랑 우승상품
- 자연어처리
- 코로나19
- Git
- 편스토랑
- PYTHON
- 프로그래머스 파이썬
- Real or Not? NLP with Disaster Tweets
- 더현대서울 맛집
- 프로그래머스
- 우분투
Archives
- Today
- Total
목록
반응형
1516번 (1)
반응형
솜씨좋은장씨
[JUNGOL] 1516번 : 단어 세기 (Python)
코딩 1일 1문제! 오늘의 문제는 정올의 단어 세기 입니다. JUNGOL www.jungol.co.kr Solution from collections import Counter while True: input_str = input() if input_str == "END": break words = input_str.split(" ") word_cnt_items = sorted(Counter(words).items(), key=lambda x: x[0]) for item in word_cnt_items: print(f"{item[0]} : {item[1]}") Solution 풀이 collections의 Counter를 활용하여 풀어보았습니다. while 반복문 안에서 문자열을 입력 받습니다. 반복문은 ..
Programming/코딩 1일 1문제
2021. 5. 17. 00:08
반응형