Let's say I have a text file with the following:
line = "this is line 1" line2 = "this is the second line" line3 = "here is another line" line4 = "yet another line!"
And I want to quickly convert them into dictionary keys / values, with the string * key being the key, and the text in quotation marks as the value, as well as removing the equal sign.
What would be the best way to do this in Python?
source share