I'm trying to create a program that will take input of a sentence and a word and check that sentence for the word and return the index of the beginning of the word i.e.
sentence = "random set of words"
word = "of"
result = 9
This is what I tried
sentence = (input("Enter a sentence: "))
word = (input("Enter a Word: "))
result = sentence.split()
for x in sentence:
if x == (word):
boom = enumerate(word)
print(boom)