Extract all keys from a list of dictionaries May 26, 2023 by Tarik all_keys = set().union(*(d.keys() for d in mylist)) Edit: have to unpack the list. Now fixed.