I'm interested in Python 3 code that writes a hash to a disk file as a hash and then code that imports it into a script directly as a hash.
If importing wouldn't work then I'd be content to open and read a file, but I'd prefer not to have to rebuild a hash from a list every single time. I know that creating a list from a file is trivial, but searching a list is prohibitively slow in my script, so I want to use a hash because of the faster search. I don't actually need key-value pairs, just a list, and the hash would be purely to benchmark execution speeds at first. Thanks for all replies.