Every time I try to create a class, it gives me the IndentationError
when I haven't even added indentations yet.
I have tried restarting Jupyter and my PC and there is no luck. I have also tried using another notebook but still face the error.
CodePudding user response:
As the error shows, it is expecting an indented block after the class.
So add a statement in there, example:
class Animal():
pass
CodePudding user response:
You should understand the basics of classes in python for this. It is working fine, the only thing is that your code is incomplete. After you declare a class, it is simply expecting a class body.