Function that returns a tuple

Steven D'Aprano steve at REMOVE.THIS.cybersource.com.au
Sat Jun 16 22:02:02 EDT 2007


On Sat, 16 Jun 2007 18:30:26 -0700, Marcpp wrote:

> Hi, I need to returns a tuple from a function (reads a database)
> Any idea?.

I don't understand the question. Just return the tuple the same as you
would return an int or a float or a str or any other data type.

def return_a_tuple():
    return (1, 2, 3)


-- 
Steven.




More information about the Python-list mailing list