You are viewing a single comment. View All
trustmethisismy (16)

For your if q == "string" code, try doing:
if q.lower() == "string":

The q.lower() changes the user input to lower case, so that means you don't have to stress about checking both upper case and lower case inputs.


Another way you could simplify your code is if you did:
if "string" in q.lower():

No matter what the input, if the input has the string in it, it will activate (e.g. I want to string, I want to string pls, DAJAStringasdaisjisadfjaf)

A17aphillips (35)

@trustmethisismy: thanks, I have improved my chatbot now