Re: help with creating dict from string

2014-11-06 Thread versalytics
On Thursday, November 6, 2014 12:41:10 PM UTC-5, Peter Otten wrote: > Tim wrote: > > > hi, I have strings coming in with this format: > > > > '[one=two, three=four five, six, seven=eight]' > > > > and I want to create from that string, this dictionary: > > {'one':'two', 'three':'four fiv

Re: help with creating dict from string

2014-11-06 Thread Tim
On Thursday, November 6, 2014 12:41:10 PM UTC-5, Peter Otten wrote: > Tim wrote: > > > hi, I have strings coming in with this format: > > > > '[one=two, three=four five, six, seven=eight]' > > > > and I want to create from that string, this dictionary: > > {'one':'two', 'three':'four fiv

Re: help with creating dict from string

2014-11-06 Thread Peter Otten
Tim wrote: > hi, I have strings coming in with this format: > > '[one=two, three=four five, six, seven=eight]' > > and I want to create from that string, this dictionary: > {'one':'two', 'three':'four five', 'six':True, 'seven':'eight'} > > These are option strings, with each key-value

help with creating dict from string

2014-11-06 Thread Tim
hi, I have strings coming in with this format: '[one=two, three=four five, six, seven=eight]' and I want to create from that string, this dictionary: {'one':'two', 'three':'four five', 'six':True, 'seven':'eight'} These are option strings, with each key-value pair separated by commas. Wh