I have various JSON files on my drive that I would like to process in a loop, but how can I read them in a loop?
Basically I have a list where all filenames are included and all files are also in one folder.
The objective is to create lists out the json files in a loop.
TestList = ["cats", "dogs"]
for i in TestList:
with open ("{i}.json") as {i}_file:
print({i}_file)
Unfortunately I get syntax errors no matter how I try it.
Thank you so much in advance for your support!