- 1

What is the difference between "print" and "return" function

11th Jul 2018, 2:55 PM
Gajendra
Gajendra - avatar
4 Respuestas
0
print is used to print the object values in python where return is used to return the value of the object.
11th Jul 2018, 3:30 PM
$¢𝐎₹𝔭!𝐨𝓝
$¢𝐎₹𝔭!𝐨𝓝 - avatar
+ 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
13th Jul 2018, 11:47 AM
Om Ganesh Dahale
Om Ganesh Dahale - avatar
+ 1
nahi pata tu Bata questions he pucha rahega ya answer bhi likhega
18th Jul 2018, 11:10 AM
Vandana Purohit
Vandana Purohit - avatar
- 1
print is used to print code and return is used to return back the code
22nd Jul 2018, 4:25 AM
Vandana Purohit
Vandana Purohit - avatar