I am trying to use tomlkit 0.8.0 to create a TOML from the following data: data = { 'stuff': [ {'a':1, 'b': 2}, {'c': 3}, {'a': 4}, ] } in this format exactly: stuff = [ {a = 1, b = 2}, {c = 3}, {a = 4}, ] A simpleprint(tomlkit.dumps(data)) creates: [[stuff]] a = 1 b = 2 [[stuff]] c = 3 [[stuff]] a = 4 How can this be done is a simple way? Continue reading...