,而我試圖執行以下代碼indentationError在的if else循環
for value in jsondata:
command = value['command']
val = value['value']
print command
print val
if command=='sel_media':
t = find(dirpath + '\\' + myarg)
t1= capture(t.getX() - 50, t.getY() + 50, t.getW(), t.getH())
click(t1)
else:
print "else inside-----------"
是越來越
else:
^
indentationError: unindent does not match any outer indentation level
我不知道爲什麼這是怎麼回事? 請糾正我
Python區分空格和換行符,保持一致。我有時會遇到這個問題 – sshashank124
我懷疑這可能是由於你的標籤縮進,而你的空間縮進了空格 – Ffisegydd
我建議你在[pylint](http://www.pylint.org/)中使用[我回答你以前的問題](http://stackoverflow.com/questions/22784740/if-else-statement-inside-for-loop-is-not-working/22784759#22784759)。如果你有混合的製表符和空格縮進,Pylint應該給你一個警告。 – msvalkon