I am trying to make a voice assistant. There is lots of problem with it. But this time I am facing very strange problem in if statement. My code:
greeting() # greeting mesaage
ear = listen() # listen my voice stored in ear variable
mind = str(recognise(ear)) #recogniser convert it in text by help of google and store in mind variable
if "what"and"about"and"you" in mind:
speak(" i am also fine!")
speak("what can i do for you?")
elif "information" in mind:
speak("what you want to know from me, sir!")
Whenever I speak one of the word "what" or "about" or "you" even with "information" it executes if statement rather than elif statement. While as per my understanding it must be pass from if statement whenever this 3 words are in same string. so I am confused what is the mistake in the code.