-2
varSentence = ("The fat cat sat on the mat")
print (varSentence)
varWord = input("Enter word ")
varSplit = varSentence.split()
if varWord in varSplit:
print ("Found word")
else:
print ("Word not found")
for (num, x) in enumerate(sentence):
if word == x:
print ("Your word is in position",num,"!")
Ist das:
Sie die diese oben wie verwenden können eine Hausübung? [Sehr ähnliche Frage] (http://stackoverflow.com/questions/41121622/need-to-get-it-to-display-the-position-of-the-inputted-word-not-every-word) wurde gepostet ungefähr 15 Minuten vor diesem. – elParaguayo
http://stackoverflow.com/questions/41121622/need-to-get-it-to-display-the-position-of-the-inputted-word-not-every-word/41122004?noredirect=1#comment69447633_41122004 – harshil9968