From fbcd3c5c6b1c853df61bd4fef68ef07185b66722 Mon Sep 17 00:00:00 2001 From: Jasper Dahil Date: Fri, 3 Nov 2017 10:06:30 +0000 Subject: [PATCH] sorted out the comma bug --- determineUserInput.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/determineUserInput.py b/determineUserInput.py index 89b7f78..ceee7b9 100644 --- a/determineUserInput.py +++ b/determineUserInput.py @@ -10,10 +10,12 @@ def determineUserInput(sentence): sentence = sentence.lower() #first - getting rid of unwanted chars unwantedChar = [".","'","!","?",","] + for char in unwantedChar: - sentence.replace(char,"") - + sentence = sentence.replace(char," ") + print(sentence) sentenceParse = sentence.split() + print(sentenceParse) if sentenceParse[0] in questionStarters: # ------------- execute the "what is" code here --------------- response = respondQuestion(sentence), 2 elif sentenceParse[0] in greetings: