print(result(20,20))
this only prints the result of 20+20 and does not save the result of the op into “result”, “result” is the name of the function. if you want to save the return value,
answer = result(20,20)
print answer
if answer == 40:
print ("we made it")
else:
print ("Nooope")
take note that print result
would result in:
<function result at 0x4095ed8>
that is actually the funciton object.
hope it helps to clarify a little.
2
solved What’s wrong with my code in python? [closed]