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
- gs25
- leetcode
- 편스토랑 우승상품
- Baekjoon
- dacon
- Real or Not? NLP with Disaster Tweets
- github
- 파이썬
- 맥북
- ChatGPT
- SW Expert Academy
- 더현대서울 맛집
- 코로나19
- Docker
- hackerrank
- ubuntu
- 편스토랑
- AI 경진대회
- 자연어처리
- Kaggle
- 프로그래머스 파이썬
- 우분투
- Git
- programmers
- 캐치카페
- 프로그래머스
- 데이콘
- 백준
- PYTHON
- 금융문자분석경진대회
Archives
- Today
- Total
솜씨좋은장씨
[leetCode] 2129. Capitalize the Title (Python) 본문
728x90
반응형

코딩 1일 1문제! 오늘의 문제는 leetCode의 Capitalize the Title 입니다.
Capitalize the Title - LeetCode
Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview.
leetcode.com
👨🏻💻 코드 ( Solution )
class Solution:
def capitalizeTitle(self, title: str) -> str:
answer = []
lower_title = title.lower()
lower_title_list = lower_title.split()
for title in lower_title_list:
if len(title) > 2:
title = title.capitalize()
answer.append(title)
return " ".join(answer)

GitHub - SOMJANG/CODINGTEST_PRACTICE: 1일 1문제 since 2020.02.07
1일 1문제 since 2020.02.07. Contribute to SOMJANG/CODINGTEST_PRACTICE development by creating an account on GitHub.
github.com
'Programming > 코딩 1일 1문제' 카테고리의 다른 글
[leetCode] 2108. Find First Palindromic String in the Array (Python) (0) | 2022.01.26 |
---|---|
[leetCode] 1291. Sequential Digits (Python) (0) | 2022.01.25 |
[leetCode] 2114. Maximum Number of Words Found in Sentences (Python) (0) | 2022.01.23 |
[BaekJoon] 4378번 : 트ㅏㅊ; (Python) (0) | 2022.01.22 |
[BaekJoon] 1037번 : 약수 (Python) (0) | 2022.01.21 |