0

what is the value of using return() over print() within functions?

20th Aug 2016, 1:08 PM
Chris Denhart
Chris Denhart - avatar
3 odpowiedzi
+ 1
if you want to take the value of the func to the main program you can use the return statement else you can print it inside the func itself
24th Aug 2016, 6:23 AM
Arun Venu
Arun Venu - avatar
0
It returns None value and print [] (empty) in Python. In same other programs it calls Null etc.
21st Aug 2016, 5:59 AM
nitzan lahav
nitzan lahav - avatar
0
Your function can do something and you can do with function result. There are 3 cases: 1. Your function not print (Python command "print"), not send ("return") result. 2. You can print function result by "print" command. 3. You can return function result by "return" command when function is calling. (example calling function: my_value = my_func().
27th Aug 2016, 9:12 AM
Viktor Sypko
Viktor Sypko - avatar