python check if in list of dict