Dec-25-2021, 09:42 AM
(Dec-25-2021, 07:55 AM)noahverner1995 Wrote: Well, that would work indeed, but how can a program manage to get the data from the folders in the path provided into that linked list?Well, that is easy. You have done a good job. In line 24 (
print(list_of_file_contents)
) you have all the data you need.So just after "# Main method" you add a line to create the dictionary:
the_linked_list = {}... And after line "print(list_of_file_contents)" you fill the dictionary:
the_linked_list[path] = list_of_file_contentsThat should do it. You don't need the lines after "# Get files and add directory to LL".
And again: this is not a "linked list", it is a dictionary.