+ 1
Didnt we say that nothing after "return" is actually called or considered by Python? Does that apply only to "print" function?
5 Respuestas
0
No but it only applies when return is used in a function. No statement in the function after the return statement is executed
0
But isnt this a function:
Def shout(word) ? It is a function right?
So then after this we have the return statement:
Def shout ( word)
Return ...
0
It has to be in the function block. Like this
def shout(word):
return
print(word)
shout('hello')
print('hi')
Only 'hi' is printed
0
Thank you got it!
0
Thanks