A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://mail.python.org/pipermail/python-list/2001-April/088381.html below:

converting string to dict ?

converting string to dict ? converting string to dict ?Radovan Garabik garabik-news at spam.melkor.dnp.fmph.uniba.sk
Wed Apr 11 06:37:27 EDT 2001
Jason Cunliffe <jasonic at nomadicsltd.com> wrote:
 : A web input form  passes {'name':'Cleopatra'} as a string.

 : Please, is there a nice clean function to convert this string to a dict?

maybe not clean, but try dict = eval("{'name':'Cleopatra'}")



-- 
 -----------------------------------------------------------
| Radovan Garabik  http://melkor.dnp.fmph.uniba.sk/~garabik |
| __..--^^^--..__         garabik @ fmph . uniba . sk       |
 -----------------------------------------------------------
Antivirus alert: file .signature infected by signature virus.
Hi! I'm a signature virus! Copy me into your signature file to help me spread!

More information about the Python-list mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4