I am updating the key names of a list of dictionaries in this way:
def update_keys(vars: list) -> None:
keys = ["A", "V", "C"]
for v in vars:
for key in keys:
if key in v:
v[key.lower()] = v.pop(key)
Is there any pythonic way to do the key loop/update in one single line? Thank you in advance!