https://leetcode.com/problems/reverse-words-in-a-string-iii/submissions/
class Solution:
def reverseWords(self, s: str) -> str:
list = s.split(" ");
ans=list[0][::-1];
for i in range(1,len(list)):
ans+=" "+list[i][::-1]
return ans'Algorithm > Python' 카테고리의 다른 글
| 프로그래머스 - 기능개발 (0) | 2022.09.26 |
|---|---|
| 프로그래머스 - H - Index (1) | 2022.09.26 |
| 프로그래머스 - 다음 큰 숫자 (0) | 2022.09.22 |
| 프로그래머스 - 프린터 (0) | 2022.09.22 |
| leetcode - 2109. Adding Spaces to a String (0) | 2022.09.22 |