I'm stuck on this problem.
Your little brother has just learned to write one, two and three, in English. You have written a lot of those words in a paper, your task is to recognize them. Note that your little brother is only a child, so he may make small mistakes: for each word, there might be at most one wrong letter. The word length is always correct. It is guaranteed that each letter he wrote is in lower case, and each word he wrote has a unique interpretation.
Input
The first line contains the number of words that your little brother has written. Each of the following lines contains a single word with all letters in lower-case. The words satisfy the constraints above: at most one letter might be wrong, but the word length is always correct. There will be at most 1000 words in the input.
Output
For each test case, print the numerical value of the word.
texto=str(input())
lista=texto.split()
for i in lista:
if len(i)==5:
print("3")
if len(i)==3 and
print("2")
else:
print("1")
I clarify that I am very new and I am using Python 3.x, what I want to know is if there is a function that allows me to differentiate the letters because in the case of 1 and 2 the word has the same length. Thank you in advance !!