I’m unsure what the user will enter but I want to break their input sentence up into words in a list
User_input = raw_input("Please enter a search criterion: ")
User_Input_list[""]
# input example: steve at the office
# compiling the regular expression:
keyword = re.compile(r"\b[aA-zZ]\b")
for word in User_input:
User_Input_list.append(word?)
# going by thin put example input I'd want
# User_Input_list["steve", "at" , "the" , "office"]
I’m unsure how to split the input up into separate words? I will give cookies for help!
1 Answer