Is there any way to automatically generate unique variable names in Python? I'm trying to teach myself Python by creating a simple example script using a list of objects. I have a class definition (VideoItem) and a list VideoDB[].
As info for each video is entered, I'd like to instantiate a new VideoItem object with a unique name and append it to the list VideoDB.
The append is fine and entering info is fine, but I'm hung up on the object names. (Appending to a list apparently just adds a pointer to the actual object.)
My learning texts ('Learning Python' and 'Teach Yourself Python in 24 Hours') aren't much assistance with this.
I'm running python 2.1.
Any help?
(I just know this is probably something simple and I'll kick myself once one of you explains it to me.)