python check if character in list of strings