+ 4
print (print (print (5)))
Which 'print ' function is executed first in the following code and why ?: https://code.sololearn.com/cx6qnbvfiLwo/?ref=app
3 Réponses
+ 3
The first print() call (the outer most call) needs something as argument to be printed, for that, the second print() call needs to be processed first.
But the second print() call also needs something as argument to be printed, and for that, the third print() call (the inner most call) needs to be processed first.
* Remember print() returns a None object.
+ 3
Nested function calls starts from inner most call to the outer most call.
print ('third',print('second',print ('first',5)))
+ 2
Reason please... ipang