On 18/10/2007, Bryan Fodness <[EMAIL PROTECTED]> wrote: > I have a data file 'data1.dat', > > a b c d > > 1 0.1 0.11 0.111 > 2 0.2 0.22 0.222 > 3 0.3 0.33 0.333 > > 9 0.9 0.99 0.999 > > and I want to be able to access the values of b, c, or d depending on a > value of a.
Hi Bryan, Hve a look at the tutorial (on python.org) section on reading from files. You'll also need to read about string methods in the standard library (specifically, the split() method) and dictionaries (in the tutorial, again). If you get stuck, show us what you've tried and we'll try to help. -- John. _______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor