I have a tuple given below
('tutorialspoint', 30)
How do I return this tuple or any given tuple from a python function?
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()
OUTPUT
We use cookies to provide and improve our services. By using our site, you consent to our Cookies Policy. Accept Learn more