devxlogo

Return multiple values from a function in python

Return multiple values from a function in python

Python can return multiple values at a time. See below for a simple example.

def multipleValueFunc(): 
    z = 11 
    b = 22
    return z, b
  
j,k  = multipleValueFunc () 
print(j, k) 

devxblackblue

About Our Editorial Process

At DevX, we’re dedicated to tech entrepreneurship. Our team closely follows industry shifts, new products, AI breakthroughs, technology trends, and funding announcements. Articles undergo thorough editing to ensure accuracy and clarity, reflecting DevX’s style and supporting entrepreneurs in the tech sphere.

See our full editorial policy.

About Our Journalist