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"
これは、最初の 3 行を除いて、私が使用している実際のコードではありません。とにかく、私の質問は、値「y」または「n」を入力しても、3 行目に別のマークを入力するかどうかを再度尋ねられたときに、なぜ while ループが繰り返されるのかということです。無限に繰り返されるループにはまっています。Another_Mark の値が「y」または「n」に変更された場合は、繰り返されません。