“inconsistent use of tabs and spaces in indentation”

后端 未结 28 2189
北恋
北恋 2020-11-22 00:56

I\'m trying to create an application in Python 3.2 and I use tabs all the time for indentation, but even the editor changes some of them into spaces and then print out \"inc

28条回答
  •  野趣味
    野趣味 (楼主)
    2020-11-22 01:20

    I oddly ran into a similar issue with one of my .py files. I simply opened the file in Pycharm and pressed Option+Command+L which correctly formats the file contents in one go.

    I suspect I was having trouble because I coded this particular .py file through jupyter labs as opposed to my usual choice of sublime text or Pycharm and therefore ran into some hidden indentation issues many answers here have alluded to

提交回复
热议问题