Re-inserting data

Daley, MarkX markx.daley at
Wed Mar 22 00:47:31 CET 2000

The only problem with that is I don't have any control over whether or not
tuples are used.  I am using SQL to query data from a server and this is the
format it uses to return the data.  Worse yet, the tuples are not strictly
strings, but dates and numbers, also.  I am trying to pull a date from each
tuple, convert it, and return it to the tuple before it gets written to a
file.  Any ideas?

- Mark

-----Original Message-----
From: Alex [mailto:alex at]
Sent: Tuesday, March 21, 2000 1:46 PM
To: python-list at
Subject: Re: Re-inserting data

> Some clarification is necessary as to my earlier message.  Here is what
> nesting is like.
> 	  result = [(a, b, c, d, e), (a1, b1, c1, d1, e1),...]

Oh, I guess you are having trouble changing the elements because they
are tuples.  Try using lists instead.  Then you can do things like

for item in times:
    time2 = item[-1]
    time2 = munged_time (time2)
    item[-1] = time2


More information about the Python-list mailing list