I am trying to make a sort-of AI thing with Python, but I've got stuck on some part.
When the AI says something, (says hello at the beginning), it gives you the ability to input text, once you've entered that, it would go through if 'keyword' in answer statements to provide a reply. Once it replies, it calls the AImain() function, restarting that process. I can't seem to get it to restart, as compiling would just say hello initially (as intended), but give no input text ability, which results in the script ending. Here's the code:
def AImain():
response = input("YOU:")
if 'Hello' or 'Hi' in answer:
print(random.choice(welcomeMessages))
AImain()
I'm new to python and I don't understand why this isn't working. Thanks!