Python create objects in for loop
<p>I have a class to assign some parameters:</p>

<pre><code>class body:
    def __init__(self, name, number, L):
        self.name = name
        self.number = number
        self.L = L
</code></pre>

<p>And I would like to assign these parameters to 10 almost equal bodies like:</p>

<pre><code>for i in range(0, 10):
    body[i].name = "test_name"
    body[i].number = i
    body[i].L = 1.
</code></pre>

<p>And to be able to change, lets say, the parameter L of body 3 from 1 to 2:</p>

<pre><code>body[3].L = 2
</code></pre>

<p>Thank you very much for the help.</p>
