Simple question - stock market simulation

Paul Rubin http
Mon Feb 9 05:58:54 CET 2009


"cptn.spoon" <cptn.spoon at gmail.com> writes:
> I'm not asking for tips on the program itself, I just can't figure out
> how to get the data structures in place. Would I use Classes or would
> I use dictionaries? Am I completely off the mark with this?

Typically you would use a class for the multi-fielded data structure;
a dictionary is intended more for lookup tables where you don't know
ahead of time what the keys will be.  Also, you'd typically use a list
[1,2,3] rather than a tuple (1,2,3) to hold the price list.



More information about the Python-list mailing list