Re-inserting data

Greg Ewing greg at cosc.canterbury.ac.nz
Tue Mar 21 23:24:38 EST 2000


"Daley, MarkX" wrote:
> 
> I guess this is a list of tuples.  Will this code work for this application?

Since they're tuples, you won't be able to modify
them in-place. You'll have to convert them to lists
first (using the built-in list() function).

If you're feeding the result to something that needs
tuples and not lists, you can use the tuple() function
to convert your modified lists back into tuples.

-- 
Greg Ewing, Computer Science Dept,
+--------------------------------------+
University of Canterbury,	   | A citizen of NewZealandCorp, a	  |
Christchurch, New Zealand	   | wholly-owned subsidiary of USA Inc.  |
greg at cosc.canterbury.ac.nz	   +--------------------------------------+



More information about the Python-list mailing list