0

I am trying to parse data in python in the format below. I came across configparser which is somewhat I am looking for but the library needs data in a specific format. Sections need to be inside square braces and key,val pairs separated by either '=' or ':'. Is there any way to create a parser to parse my data?

Section1 
{
    key1 val1
    key2 val2
}
Section2 
{
    key3 val3
    key4 val4
}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.