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 |
Tags
- gs25
- 자연어처리
- Baekjoon
- Kaggle
- SW Expert Academy
- leetcode
- hackerrank
- 백준
- 데이콘
- 프로그래머스
- 편스토랑
- 맥북
- github
- 편스토랑 우승상품
- 캐치카페
- 파이썬
- 금융문자분석경진대회
- ChatGPT
- 프로그래머스 파이썬
- Git
- PYTHON
- Real or Not? NLP with Disaster Tweets
- ubuntu
- 우분투
- programmers
- dacon
- Docker
- AI 경진대회
- 코로나19
- 더현대서울 맛집
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
반응형