Top.Mail.Ru
Python
? ?
LiveJournal for python.
View:Personal Journal.
View:Friends.
View:Calendar.
Missed some entries? Then simply jump to the previous day or the next day.

Monday, May 30th, 2005

Subject:Naming objects with input text...
Time:12:38 pm.
I have a question, it'll be a bit tough to explain so bear with me...

In Python, how would I be able to name objects like Variables, Classes, Lists, and so on, with the name I give it from run-time input to keep it unique from other objects that may be present? For example...

Enter Name: Veronica

Then in the program, it takes that name as a label to define any given object I want it to. Here, I typed Veronica, so it made a list called Veronica.
Veronica = []

I understand that the input is read as string text, so objects can't be named with strings. I wondered how to do it, in case I need a unique variable with my programs.

Thanks!
~SciuCaro
Comments: Read 28 orAdd Your Own.

LiveJournal for python.

View:User Info.
View:Friends.
View:Calendar.
View:Memories.
Missed some entries? Then simply jump to the previous day or the next day.

Image