Argument mismatch in python constructor : <p>I have written a python class whose constructor takes two lists as arguments.</p>

<pre><code>class nn:
    def __init__(layer_dimensions=[],activations=[]):

        self.parameters = {} 
        self.cache = []      
        self.activations= []

        initialize_parameters(layer_dimensions)
        initialize_activations(activations)

net = nn(list([2,15,2]),list(['relu','sigmoid']))
</code></pre>

<p>On trying to pass two lists as arguments in the constructor I get the following error:</p>

<pre><code>TypeError: __init__() takes from 0 to 2 positional arguments but 3 were given
</code></pre>

<p>The error states that 3 arguments have been passed but its quite obvious that I've passed only 2.</p>
