Python __str__ and lists
<p>In Java, if I call List.toString(), it will automatically call the toString() method on each object inside the List. For example, if my list contains objects o1, o2, and o3, list.toString() would look something like this:</p>

<pre><code>"[" + o1.toString() + ", " + o2.toString() + ", " + o3.toString() + "]"
</code></pre>

<p>Is there a way to get similar behavior in Python? I implemented a __str__() method in my class, but when I print out a list of objects, using:</p>

<pre><code>print 'my list is %s'%(list)
</code></pre>

<p>it looks something like this:</p>

<pre><code>[&lt;__main__.cell instance at 0x2a955e95f0&gt;, &lt;__main__.cell instance at 0x2a955e9638&gt;, &lt;__main__.cell instance at 0x2a955e9680&gt;]
</code></pre>

<p>how can I get python to call my __str__ automatically for each element inside the list (or dict for that matter)?</p>
