Notice
Recent Posts
Recent Comments
Link
목록replace (1)
나의 개발일지
문제 : https://school.programmers.co.kr/learn/courses/30/lessons/81301 dictionary, replace 활용 def solution(s): d = {"zero" : "0", "one" : "1", "two" : "2", "three" : "3", "four" : "4", "five" : "5", "six" : "6", "seven" : "7", "eight" : "8", "nine" : "9", } for i in d: if i in s: s = s.replace(i, d[i]) return int(s) print(solution("one4seveneight"))
프로그래머스
2023. 9. 22. 18:05