Есть ли простой способ сделать словарь для множества разных файлов json?Я хотел бы создать словарь, но также учитывать время обработки, например, если у меня есть 1 тысяча файлов json.
Мой текущий код:
#My current approach loop each file and then create a dictionary for the particular file. Since its looping so it will take much time if the files are too huge
# I would like to consider the huge file process time in making the dictionary and searching for another alternative to my current codes.
file = [[[json],[json],[json],[json],[json]]] #this is just an example of 5 json files for explanation and seeking help purpose. In real aim is to focus in 1000++ json files.
full_dic = {}
for i, f in enumerate(file): # this loop each file but what if I have thousands so it will take much time
dictionary = {}
for ii, fs in enumerate(f): # this loop each file sentence, even worse when have thousands f(file)
**Here I will create my dictionary by reading the json file contents, this part does not matter because it depends on my json files, so can be ignored**
**Finally, dictionary created like this**
dictionary[ii] = something
full_dic[i] = dictionary
есть даже многоболее лучший способ или время, сокращающее способ сделать это, имея большие наборы данных?