0

I have problem with indent , how to resolve?

text = input('entrer texte') word = input('entrer word') def search(text , word): i = 0 for letter in word: if word in text: i += 1 return i return "Word found" else: return "Word not found" print(search(text, word))

8th Mar 2021, 11:31 PM
Ska 2020
Ska 2020 - avatar
5 Respostas
+ 1
text = input('entrer texte') word = input('entrer word') def search(text , word): i = 0 for letter in word: if word in text: i += 1 print("Word found") return i ''' it is not possible to use return twice in a single if block, read more about return statement! ''' else: return "Word not found" print(search(text, word))
8th Mar 2021, 11:59 PM
iTech
iTech - avatar
9th Mar 2021, 9:44 PM
❤️😍Prerana😍❤️
❤️😍Prerana😍❤️ - avatar
0
I need to count numbers of words that same in text
8th Mar 2021, 11:32 PM
Ska 2020
Ska 2020 - avatar