Below I have some code for a system that looks for keywords in sentences, I'm using the .split()
extension for this task. It works fine but when I input the same keyword for example, "Hello." the full stop in my input doesn't match the codes so it returns an error. My question is that is there a way to allow grammatical inputs such as .Upper()
and .Lower()
allow for capital letters etc?
input1 = input("Input 'Hello'")
response = input1.split()
if "Hello" in response:
print("Howdy!")
Output Error:
"Hello." is not defined.