Respuesta :
Answer:
see explaination
Explanation:
def words2number(s):
words = s.split()
numbers = ['zero', 'one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine']
result = ""
for word in words:
if word in numbers:
result += str(numbers.index(word))
return result
Answer:
Check the explanation
Explanation:
def words2number(s):
words = s.split()
numbers = ['zero', 'one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine']
result = ""
for word in words:
if word in numbers:
result += str(numbers.index(word))
return result
# remove below test line before submitting this code.
print(words2number('one five two'))
Kindly check the attached image below for the code output.
