python check if input is in list