We can return a tuple from a python function in many ways. For the given tuple, we define a function as shown below.
Example
def foo(): str = "tutorialspoint" x = 30 return (str, x); print foo()
Output
('tutorialspoint', 30)
We can return a tuple from a python function in many ways. For the given tuple, we define a function as shown below.
def foo(): str = "tutorialspoint" x = 30 return (str, x); print foo()
('tutorialspoint', 30)