Re: String to Dictionary conversion in python

2017-09-19 Thread sohcahtoa82
On Thursday, September 14, 2017 at 11:01:46 PM UTC-7, santosh.y...@gmail.com wrote: > Hi, > > Can anyone help me in the below issue. > > I need to convert string to dictionary > > string = " 'msisdn': '7382432382', 'action': 'select', 'sessionId': '123', > 'recipient': '7382432382',

Re: String to Dictionary conversion in python

2017-09-16 Thread Piet van Oostrum
Rustom Mody writes: > On Saturday, September 16, 2017 at 2:04:39 AM UTC+5:30, jlad...@itu.edu wrote: > Yeah… I used to think thus > But literal_eval has excessive crud in its error messages: > from ast import literal_eval > literal_eval("{'x':1}") > {'x': 1} > >

Re: String to Dictionary conversion in python

2017-09-15 Thread Rustom Mody
On Saturday, September 16, 2017 at 2:04:39 AM UTC+5:30, jlad...@itu.edu wrote: > On Thursday, September 14, 2017 at 11:33:56 PM UTC-7, Ian wrote: > > On Fri, Sep 15, 2017 at 12:01 AM, wrote: > > > Hi, > > > > > > Can anyone help me in the below issue. > > > > > > I need to convert

Re: String to Dictionary conversion in python

2017-09-15 Thread Ian Kelly
On Fri, Sep 15, 2017 at 12:01 AM, wrote: > Hi, > > Can anyone help me in the below issue. > > I need to convert string to dictionary > > string = " 'msisdn': '7382432382', 'action': 'select', 'sessionId': '123', > 'recipient': '7382432382', 'language': 'english'" >

Re: String to Dictionary conversion in python

2017-09-15 Thread Bill
santosh.yelamar...@gmail.com wrote: Hi, Can anyone help me in the below issue. I need to convert string to dictionary string = " 'msisdn': '7382432382', 'action': 'select', 'sessionId': '123', 'recipient': '7382432382', 'language': 'english'" Can anyone help me with the code I'm new to