Indentation of IF-ELSE block in python

前端 未结 7 1271
青春惊慌失措
青春惊慌失措 2020-12-11 08:48

Hi I am python newbie and I am working on NLP using python. I am having a error in writing if-else block in python. When I am writing only if block at that time it is workin

7条回答
  •  悲哀的现实
    2020-12-11 09:26

    I've been getting this error even the indentation looked correct. Viewing in Notepad++ there is an option to see white spaces and Tabs. The error was caused by mixing spaces and tabs to create indentation. Replacing Tabs with spaces in every line helped to get rid of an error.

提交回复
热议问题