Oct-23-2018, 04:24 AM
(This post was last modified: Oct-23-2018, 04:35 AM by alinaveed786.)
Hi,
Unable to print "Yes". It's only printing "No". Can anyone please help me in the if part of the code, I think the error is there
Got it.
Unable to print "Yes". It's only printing "No". Can anyone please help me in the if part of the code, I think the error is there
Var1 = [27923320, 27547329, 21171382, 21463894, 18961555, 28432129] i=0 while i < len(Var1): if i == [27923320, 27547329]: print("Yes") else: print("No") i += 1
Got it.
Var1 = [27923320, 27547329, 21171382, 21463894, 18961555, 28432129] i=0 while i < len(Var1): if Var1[i] == 27923320 or Var1[i] == 27547329: print("Yes") else: print("No") i += 1