C
Chris Patton
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!
---
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!
---