I am writing a program that takes a blank input and does various things with it. The input "show me contact _____" (With the ____ being filled in with somebody's name). The names are stored in a list and I need it to be able to check if the name is in the list, and if it is, print the contact information. I figured an if statement would be the best way to do it, but I cannot figure out how.
Edit: I have tried using in, but my problem is that the input contains "show me contact _____" and not just the name. This causes this:
names = ['john doe','john doe','john doe']
user_input = input('>')
if user_input in names:
print(email)
to not work.