python check if user input is in list