+ 1
Why "if condition" runs everytime in both true/false condition
In the code Line Number :17 https://code.sololearn.com/cw54rcNwRcBB/?ref=app
4 Réponses
+ 3
try
if found==False:
P.S
its happening because of scoping
the "found variable" is inside for loop so outside of for loop its just undefined variable. and invert it you get true all the time
( swap line 11 and 12 .)
+ 3
Amit Biswas i have edited my answer .
because of single space indentation i wasn't able to read clearly .
+ 2
Not working....
+ 2
Thanks....I have fixed it