I have a Python
script that reads a string from a file which is have several key=value
elements. An example is:
A=Astring,B=Bstring,C=Cstring
Is there an easy way to read this straight into a dictionary? Or would I have to manually build a dictionary after splitting by ,
and again by =
.