0
What is the difference of return and print in python
#print #return
3 Answers
+ 2
- return:
Its used ONLY inside functions and return some value to caller to the function (or return nothing though technically it return None value)
- print:
its a builtin function (in py3) that allow you to add text to your console
example:
def mul(a,b):
return a*b
# here result will be 40
result= mul(5,8)
print(result)
# Now 40 is printed to your console
+ 1
thanks đ
0
đđđ