I have a task for a school test. We have to create a program in python 3. The program has to search in a file, like a dictionary with all kinds of words for the right matches. If the search word would be: B?X?? The rustles could be: BOXER BOXEN BOXTE .... But it is not just one word, in a separate file the search words are stored, now I have to open both files and print out the correct answers. For one word it works like this:
if len(word) == len(search):
ok = True
for index in range(len(word)):
character = search[index]
if character == "?":
continue
if character != word[index]:
ok = False
break
if ok:
print(word)
In addition to adding the other text i have to convert the german letter ä in to ae, ö in oe and ü in oe, as well as ß into ss. That is the part were I am stuck... I am new to this, but I have searched the board and couldn't find anything.