Re-inserting data

Felix Thibault felixt at dicksonstreet.com
Wed Mar 22 02:46:06 CET 2000


At 15:47 3/21/00 -0800, Daley, MarkX wrote:
>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

You could unpack the tuples, then pack them up again like:

for index in range(len(times)):
    date, time, whatever, andever, amen = times[index]
    date = change_ola(date)
    times[index] = (date, time, whatever, andever, amen)
    






More information about the Python-list mailing list