I see that the error counter=1
is not the correct syntax. Since it's in an if
statement, you will be comparing, not setting. Instead, on that line, it should be changed to:
if each==final and counter==1:
It should be ==
not =
.
References
If Statements
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…