As part of a project I have to be able to identify keywords that a user would input.
For example if I type "how to i find London" it would see the words London and find.
How would I do this using an array to make the code look cleaner.
city = [London, Manchester, Birmingham]
where = input("Where are you trying to find")
if(city in where):
print("drive 5 miles")
else:
print("I'm not to sure")
So I just want to know how do I find words from an array within a user input.
This isn't the project but a similar way of doing it.