Another_Mark = raw_input("would you like to enter another mark? (y/n)")
while Another_Mark.lower() != "n" or Another_Mark.lower() != "y":
Another_Mark = raw_input("Do you want to input another mark? Please put either 'y' or 'n' this time")
if Another_Mark == "y":
print "blah"
if Another_Mark == "n":
print "Blue"
이것은 처음 세 줄을 제외하고 사용하고있는 실제 코드가 아닙니다. 어쨌든 내 질문에 왜 while 루프는 'y'또는 'n'값을 입력해도 반복되는데, 세 번째 줄에 다른 기호를 입력 할 것인지 다시 묻는 것입니다. 나는 무한 반복되는 루프에 갇혀있다. 그것은 Another_Mark의 값이 변경 될 때 반복해서는 안 중 하나 "Y"또는 "N"파이썬 루프가 계속 반복됩니까? 왜?
'하지 (a 또는 : 그리고 젖혀 OR에 (당신이 뭘 하려는지입니다)
아니면 괄호에 NOT을 배포 할 수 있습니다 : 당신은 말할 수 b)'(당신이 설명하는 것)은'not a or not b' (코드가 말하는 것)와 같지 않습니다. –