在遍歷打印10以內的奇數是出現“TabError: inconsistent use of tabs and spaces in indentation”的錯誤提示:
代碼如下:
第一感覺沒什么錯誤,但是當我設置顯示“空格與制表符”時候,問題出現了,在第4、5行前由制表符,如圖所示:
在if和continue前有制表符,所以執行的時候會提示“TabError: inconsistent use of tabs and spaces in indentation”
解決問題重新運行,結果OK。
親測好使。。。