title: "[프로그래머스] 숫자 문자열과 영단어 Python 파이썬 해설 (Level 1) - 이도훈"
cleanUrl: "programmers/81301"
description: "프로그래머스 Level 1 문제 [숫자 문자열과 영단어]의 풀이를 정리합니다."
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 k, v in d.items():
s = s.replace(k, v)
return int(s)
프로그래머스 코딩테스트 연습 https://school.programmers.co.kr/learn/challenges