I\'m getting an error while running the following code:
class Person: def _init_(self, name): self.name = name def hello(self): print \'Initiali
The method should be named __init__ to be a constructor, not _init_. (Note the double underscores.)
__init__
_init_
If you use single underscores, you merely create a method named _init_, and get a default constructor, which takes no arguments.