Syntax error TypeError: __init__() takes exactly 1 argument (5 given)

TypeError: __init__() takes exactly 1 argument (5 given)



You need to indent all the method definitions so that they are under the class. 

example

class A():

def __init__():

pass


You can learn more about indentation and how it needs to be used in Python here −

https://www.tutorialspoint.com/python_online_training/python_lines_and_indentation.asp

Updated on: 2020-03-06T05:09:08+05:30

195 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements