def keys_only(flat_dict): lst = [] for k, v in flat_dict.items(): lst.append(k) return lst