只是为了有另一个选择:
keep = {'key1', 'key2', 'key3', 'key4'} for h in mydict: h['c'] = [ e for e in h['c'] if len(keep - set(e.keys())) == 0 ]