<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:arial,helvetica,sans-serif;font-size:12pt">Hello, I'm trying to find out the best course of action for the next stage of my program.<br><br>I want to hold information on various idols. I first thought to do this with classes, but realised that I could represent the data the same way with a dictionary. So I am now just concentrating on dictionaries. <br><br>So lets say for example I wanted to have a dictionary with keys like this.<br><br>chiaki = { "name" : "Chiaki Kuriyama",<br> "age" : "26",<br> "charm_point" :
"nose",<br> "profile_pic" : "/home/jigenbakuda/Pictures/chiaki/chiaki.jpg",<br> "pic_quantity" : 120,<br> "bio" : "First met this lady in kill bill, and the descent afterwards was horrible, I fan boy over this chick hard, etc..."}<br><br><br>I understand, or at least I have pretty good ideas about how to get this information (the keys and their values) from a user. <br><br>I was thinking something like this for my general flow (this is all just fake code trying to represent my thought process)<br><br>mold = {
"name" : " ",<br>
"age" : " ",<br>
"charm_point" : " ",<br>
"profile_pic" : " ",<br>
"pic_quantity" : 0 ,<br>
"bio" : " "}<br><br><br>chiaki = copy.copy(mold)<br>#have the user fill in the data here<br>natalie = copy.copy(mold)<br>#have the user fill in the data here<br># etc...<br><br><br>But my question is how do I repeatedly automate new names for the
dictionaries? Like how do I get the user to create the dictionary name
(chiaki, natalie, etc...)? <br><br>Would it be better to represent this data with classes? If so, how do I have users create new class names? Ex. chiaki = Idol(), how do I get the user to create the chiaki name?<br><br>Any hints, answers, or links to recommended reading would be greatly appreciated :)<br><br><br> <br><div> </div>----<br>What is it about you... that intrigues me so?</div></body></html>