[프로그래머스] 09/25 (2)
·
코딩테스트/프로그래머스[Fail]
[숫자 문자열과 영단어]-[2021 카카오 채용연계형 인턴십] My answer def solution(s): code=["zero","one","two","three","four","five","six","seven","eight","nine"] answer,tmp = "", "" for i in range(len(s)): if(s[i].isdigit()): answer+=s[i] else: tmp+=s[i] if(tmp!="" and tmp in code): for i in range(len(code)): if(tmp==code[i]): answer+=str(i) tmp="" return int(answer) Another answer num_dic = {"zero":"0", "one":"1", "t..