Can Python function return multiple data?

John Gordon gordon at panix.com
Tue Jun 2 17:40:30 EDT 2015


In <3bbe49da-e989-4a8c-a8a9-75d3a786f508 at googlegroups.com> fl <rxjwg98 at gmail.com> writes:

> Hi,

> I just see the tutorial says Python can return value in function, it does 
> not say multiple data results return situation. In C, it is possible.
> How about Python on a multiple data return requirement?

Python functions can return lists, tuples, dictionaries, or any other
container-like object.

-- 
John Gordon                   A is for Amy, who fell down the stairs
gordon at panix.com              B is for Basil, assaulted by bears
                                -- Edward Gorey, "The Gashlycrumb Tinies"




More information about the Python-list mailing list