0
what is the difference between return and print ????
def max(x, y): if x >=y: return x else: return y if i remove return and put print it will give the same answer, so what is the difference ???
4 Respostas
+ 2
print is Just an display of your values in normal usage. return values for usage in other place in script, return doesnt display value (except in python shell .
0
@Alexis Beaufils, what is the python shell???
0
this is the interactive python interpreter, ipython for exemple or just when you run "python" on your prompt
0
@Alexis Beaufils, you mean the IDLE of python ???