python getting a specific attribute from a list of objects
<p>I have a python array of objects</p>

<pre><code>class ball(self, size, color, name):
  self.size = size
  self.color = color
  self.name = name
</code></pre>

<p>then a user will inputs a name and an attribute via the command line. For example a user could input  "name1" and then "color" or "weirdName" then "size"... I then want to find the object based on the name and print get either the color object or the size object. Can I do it like this or will I need to use a switch case?</p>

<p>Thanks</p>
