is it possible that a function have more than one return statements
Answers
Answered by
0
Answer:
no
Explanation:
A function can only have one return statements
Answered by
5
Answer :
Yes, it is possible for a function to have more than one return statement
Eg:
def fun(a) :
if a ==1 :
return 2
else :
return 0
a = int(input("Enter"))
R=fun(a)
print(R)
Hope it helps....
Similar questions