Jan-04-2022, 07:08 PM
You also need to realise that printing and returning are not at all the same. The former writes the value to the standard output stream, so the
print
function returns None
. In the latter case, the value returned is made available to the caller and can hence be used in further computations.