Sunday 29 September 2013

How can I turn a Regular String into a Keyword? [Python]

How can I turn a Regular String into a Keyword? [Python]

Recently, I have been programming in the language of Python. I've came
across the problem of trying to convert a string into a keyword.
Suppose I use a raw_input() phrase and turn that string into an object,
list, or dictionary.
For example, I can turn the string "Foo" into Foo and assign that name to
a python structure.
How would I do this?

No comments:

Post a Comment