String to Dictionary conversion in python

Bill BILL_NOSPAM at whoknows.net
Fri Sep 15 02:13:32 EDT 2017


santosh.yelamarthi at 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 Python too, but it looks like you need to "split" it about 
the commas. Right?



More information about the Python-list mailing list