I have written a very simple program to create an instance in Python. my code is as follows.
Expand|Select|Wrap|Line Numbers
- class Athlets:
- def _init_(self,a_name):
- self.name=a_name
- sarah = Athlets("Sarah")
- print(sarah)
But I am getting TypeError like bellow
Traceback (most recent call last):
File "test_class.py", line 4, in <module>
sarah = Athlets("Sarah")
TypeError: this constructor takes no arguments
please help
thanks