Hello, I am trying to sum lists if a condition is met, not working, not sure why, I end
up with PN=[0,0,0,0,0,0,0,0] which is it's initial condition and should be PN=[1,1,1,1,0,1,1,1]
as PN0 and PN1 satisfy the condition PNi.count(1)<2, so PN+PN0+PN1 = [1,1,1,1,0,1,1,1].
Thanks.
>>> PN0=[0,0,1,1,0,1,0,1]
PN1=[1,1,0,0,0,0,1,0]
PN2=[0,0,0,0,1,0,0,0]
PN=[0,0,0,0,0,0,0,0]
NULL==[0,0,0,0,0,0,0,0]
for i in range(3):
if PNi.count(1) < 2:
PN=[sum(pair) for pair in zip(PN, PNi)]
print('Yes')
else:
PNi=NULL
print('No')