# Pastebin PMzc5d8J In [6]: import yaml In [7]: gt = yaml.load(open("datasets/danceability/metadata/groundtruth.yaml")) /usr/local/bin/ipython:1: YAMLLoadWarning: calling yaml.load() without Loader=... is deprecated, as the default Loader is unsafe. Please read https://msg.pyyaml.org/load for full details. #!/usr/bin/python3 In [8]: filelist = {} In [9]: for k in gt['groundTruth'].keys(): ...: filelist[k] = "datasets/danceability/features/mp3/%s.json" % k ...: In [10]: yaml.dump(filelist, open("datasets/danceability/metadata/filelist.yaml", "w"))