copying a tuple to a list..

Sybren Stuvel sybrenUSE at YOURthirdtower.com.imagination
Mon Mar 6 13:27:35 EST 2006


sergio at village-buzz.com enlightened us with:
> i have a result tuple from a MySQLdb call that would like to change in
> place..
>
> i would like to copy it to a list, so i can modify it in place, but i
> cannot figure out how to do it.

dataResults = (1, 2, 12)
dataList = list(dataResults)

Sybren
-- 
The problem with the world is stupidity. Not saying there should be a
capital punishment for stupidity, but why don't we just take the
safety labels off of everything and let the problem solve itself? 
                                             Frank Zappa



More information about the Python-list mailing list