Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
import json
json_file = json.load(open("temp.json"))
result = "" # resulting string
for x in json_file["files"]:# "files" for key value that is assigned to
# the file array
chapter_file = open(x)
result += chapter_file.read()
# open output_file, write out, flush buffer to complete write and close
output_file = open("output.md","w")
output_file.write(result)
output_file.flush()
output_file.close()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.