- 1
What is the difference between "print" and "return" function
4 Answers
0
print is used to print the object values in python where return is used to return the value of the object.
+ 5
Hi Gajendra,
Difference between return and print is that return will immediately stop executing the defined function in which it is running with returning a value.
in short: return will not execute the code written after it
also print outputs the value and return will not output but it can be assigned to a variable
- Om Ganesh Dahale
+ 1
nahi pata tu Bata questions he pucha rahega ya answer bhi likhega
- 1
print is used to print code and return is used to return back the code