new to python

Chris Patton chrispatton at gmail.com
Sun Oct 10 01:34:01 EDT 2004


I need to make several user-defined objects for a program I'm making.
I know that one way is to use the exec statement (i.e. exec
'raw_input() = "cheese"'), but it can get very visually cluttered at
times.
i.e. exec raw_input()+num+'={"I":'+b+','+am+':"just","fine":1}'

Does anyone know a different way I can do this? I need to do this to
define a dictionary, but a general method for all objects would be
better.

Thanks for any help!
---



More information about the Python-list mailing list