list=['a','a','x','c','e','e','f','f','f']
i=0
count = 0
while count < len(list)-2:
if list[i] == list[i+1]:
if list [i+1] != list [i+2]:
print list[i]
i+=1
count +=1
else:print "no"
else:
i +=1
count += 1
私は得ています:
else:print "no"
^
IndentationError: unexpected indent
次の要素に一致するエルトのみを出力しようとしていますが、それに続く要素は出力しません。私はPythonが初めてで、なぜこれが機能しないのかわかりません。