Also mache ich ein Projekt, wo ich eine Liste mit englischen Wörtern habe und will es das Wort zu überprüfen ich schreibe ist in der Liste und sagen Sie mir, ob es in Englisch ist oder nicht, ich habe keine Idee, wie dies zu tun, aber es ist, was ich soll so tun, die ich für Ihre HilfeÜberprüfen, ob Word ist Englisch Python
text = open("dict.txt","r")
#Opens the dict.txt file I have and reads it
word = input("Type a word to check if it's english.")
#Type in a word to check if is english or not
if(word in text == true):
print(word, "Is in English.")
elif(word in text == false):
print(word, "Is not in English.")
#Check if word is true or false in the dict.txt and print if it is english or not.
Sie müssen Ihre Frage formatieren –
In Python ist es 'True' und' False' mit Großbuchstaben. – Will
Sorry, ich hatte immer einen Fehler während ich es versuchte, also wusste ich nicht, was ich tun sollte, danke, dass ich es korrigiert habe. – Kobbi