[Tutor] dynamically creating list
Bala subramanian
bala.biophysics at gmail.com
Mon Mar 23 15:40:26 CET 2009
Dear Friends,
I have a text output file from a program that does clustering. Now i have to
parse the text output file to separate data points belonging to each
cluster.
I am thinking to design the algo. in the following way.
i) ask the user the text output file
ii) ask the user for the number of clusters created (say 5)
iii) create 5 lists inside the program, write data points belonging to 5
different cluster in the 5 lists created
1) Now my question is, how to make this list creation dynamics, say if user
enter number of clusters = 4, i would create four list. If the user enter 3,
then i shd create three lists inside my program. How to do this dynamic
creation of list depending on user input.
2) Is there any other better way or object that i can use to do this
effectively.
Thanks in advance,
Bala
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20090323/440160c1/attachment.htm>
More information about the Tutor
mailing list