uploaded at 2022. 12. 17. 오전 4:47:05
This commit is contained in:
@@ -0,0 +1,7 @@
|
|||||||
|
// [문제 링크]: https://school.programmers.co.kr/learn/courses/30/lessons/81301?language=python3
|
||||||
|
|
||||||
|
def solution(s):
|
||||||
|
words = ['zero', 'one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine']
|
||||||
|
for i in range(len(words)):
|
||||||
|
s = s.replace(words[i], str(i))
|
||||||
|
return int(s)
|
||||||
Reference in New Issue
Block a user