Can a function return multiple values? Why?

Yes, a function can return multiple values in python. To return multiple values we need to do followings:
The return statement should be written like
return value1,value2,……..
Values returned by function call should be stored in tuple or by specifying same no of variables.
For Example:

 def perimeter(r):
   circle = 2*3.14*r
   square = 4*r
   triangle = 3*a
   return circle,square,triangle 
 
 a=intinput((“Enter Length”))
 
 c,s,t = perimeter(a)
 print(“Perimiter of Circle”,c)
 print(“Perimiter of Square”,s)
 print(“Perimiter of Triangle”,t) 
error: Content is protected !!