0
return statement
When a function ends with "return true" or "return false" e.g. def myFunct(a, b): x = a*b return False # or return True What is it returning ?
5 Antworten
+ 2
Abhay : I would not call the rest useless:
example:
def func(x):
print(f“given: {x}! squared: {x*x}“)
return True
0
So Jan if we call myFunct(2, 3)
we'll just get a boolean value "False" and all the other information within that function is useless?
0
Mawande Mbudane yes it is useless ,the final value returned is all that matters ,
0
Alexander Thiem yes ,ty