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', 'language
On Sat, 16 Sep 2017 11:29 am, Rustom Mody wrote:
>> > py> import ast
>> > py> string = " 'msisdn': '7382432382', 'action': 'select',
>> > 'sessionId': '123', 'recipient': '7382432382', 'language': 'english'"
>> > py> ast.literal_eval('{%s}' % string)
>> > {'sessionId': '123', 'recipient': '7382432
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}
>
> Ok…
>
literal_eval
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 string to dicti
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 string to dictionary
> >
> > string = " 'msisdn': '7382432382', 'action': 'select', 'sessionId': '123',
> >
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'"
>
> Can anyone help me with the
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 Pyt
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
--
https://mail.python.org/mailman/listinfo/python-l