0
why there is no output?
7 Réponses
+ 1
because there is no return for the lists function
+ 1
oh i got it. the execution timed out. it never stopes the while loop in the lists function
+ 1
its true. the yield returns the value when the function stops. because the function never stopes, it never gives an output. look at this:
(its your own code with a print(num) )
https://code.sololearn.com/cZsDtiv6BB4a/?ref=app
+ 1
difference between yield and return is that yield returns the values when the function stops. but return , stopes the function and returns the value
+ 1
yw man. happy to help 😊😊
0
but there is yield
0
got it bro.thanks😊