On Oct 17, 10:44 pm, Chris McComas <[EMAIL PROTECTED]> wrote: > i have a python script that is computing ratings of sports teams. > > what i'm trying to do is setup an iteration for the rating so that the > python program recomputes the rating if any of the value difference is > > > 0.00005. it's common for sports ratings to run such iterations... > > any tips, pointers on where to look on how to do this the best way? > > right now i'm getting the ratings from the file, limiting my results > to 1 entry, the biggest number, if it's > 0.00005, then i want it to > compute the ratings again. if it is < 0.00005 then it just goes on to > the next step in the file. > > thnx in advance.
Can you cut and paste a few lines? Otherwise I assume your file looks like this: A 0.00001 B 0.00003 C 0.00006 You interpret the file like this: name= A, rating= 0.00001 name= B, rating= 0.00003 name= C, rating= 0.00006 --recompute-- new values: name= A, rating= 0.00001 name= B, rating= 0.00002 name= C, rating= 0.00004 new file: A 0.00001 B 0.00002 C 0.00004 Am I right so far? -- http://mail.python.org/mailman/listinfo/python-list