Primer, ki ti bo mogoče v pomoč: >>> string = "abc=123,xyz=456" >>> dict(x.split('=') for x in string.split(',')) {'xyz': '456', 'abc': '123'}