I have a long text file with each line of pseudocode that looks like this:
big house --> ['living room', 'kitchen', 'bathroom']
There are about 700 lines like this that need to be transformed to a python dictionary in the format:
{'big house' : ['living room', 'kitchen', 'bathroom']}
As you can see, for each line, I need to make brackets at the beginning and end, replace the "-->" with ":" and place quotes around the dictionary key. Any help would be greatly appreciated.
Would the best strategy be a find and replace for "-->" and then add brackets to beginning and end in a separate regex, then tackle the key in another regex?