python check if input exists in list