Quoting Srinivas Iyyer <[EMAIL PROTECTED]>: > 2. I know how to read a tab delim txt file as list but > not into the tupeles. Apologies for my inexperience.
How are you currently reading the file? --- can you show us some code? You can create tuples directly. For example: >>> x = 3 >>> y = 7 >>> t = (x, y) >>> t (3, 7) or: >>> squares = [] >>> for i in range(10): ... squares.append((i, i**2)) # Note the double parentheses! ... >>> squares [(0, 0), (1, 1), (2, 4), (3, 9), (4, 16), (5, 25), (6, 36), (7, 49), (8, 64), (9, 81)] You can read more about tuples in the python tutorial; section 5.3. (see http://www.python.org/) -- John. _______________________________________________ Tutor maillist - [email protected] http://mail.python.org/mailman/listinfo/tutor
