0

generation variable

when does python generate the variable? does a variable generate when called, or when defined? def shout(word): return word + "!" speak = shout output = speak("Daniël") def Hello(word): return "Hello " + word + "!" speak = Hello print(output) this could print Daniël! or Hello Daniël!, but which does it print?? apologies for my bad english.

10th Apr 2017, 12:56 PM
Dion Niessen
Dion Niessen - avatar
1 Answer
+ 3
daniel
11th Apr 2017, 3:51 AM
Nihad TK
Nihad TK - avatar