I am trying to export particular globals to a config file based on a dictionary, but the script keeps exporting partial matches, so if I tried to export a global named "value" it would also export "v", "val" and "a". How to prevent that?
data_to_export = {k: v for k, v in globals().items() if k in fields}