Python注释缩进不得当导致IndentationError: unexpected indent
生活随笔
收集整理的這篇文章主要介紹了
Python注释缩进不得当导致IndentationError: unexpected indent
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
def test():i=0
'''
aaaaaa
'''while i < 5:'''bbbbbb''' print(i)i+=1if __name__ == '__main__':test()
如上,Python注釋的縮進不得當,也會導致IndentationError: unexpected indent。將注釋的縮略修改如下后解決。
def test():i=0'''aaaaaa'''while i < 5:'''bbbbbb''' print(i)i+=1if __name__ == '__main__':test()?
轉載于:https://www.cnblogs.com/shouzhenghouchuqi/p/10585513.html
總結
以上是生活随笔為你收集整理的Python注释缩进不得当导致IndentationError: unexpected indent的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 有关闭包的问题
- 下一篇: [集合]线程安全的HashMap