Extract all keys from a list of dictionaries,all_keys = set().union(*(list(d.keys()) for d in mylist))