title: Making objects from a CSV file Python
body: <p>I'm attempting to create a collection of objects in Python who's properties come from a CSV file. </p>
  
  <p>Currently, I have a simple class: </p>
  
  <pre><code>class myClass:
      name = ""
      age = 0
      hobbies = []
  
      def __init__(self, var1, var2, var3)
          self.name = var1
          self.age = var2
          self.hobbies = var3
  </code></pre>
  
  <p>In an effort to store a lot of data without cluttering the code, I've created a CSV file like so:</p>
  
  <pre><code>Robert Samson,50,swimming,biking,running
  Sam Robertson,70,reading,singing,swimming
  </code></pre>
  
  <p>and so on. I should have about 50 of these, and they may change, which is my reasoning for using CSV.</p>
  
  <p>Is there a way to systematically make myClass objects from this CSV file? I've read you shouldn't try and make objects with unique names in a loop but I'm not sure why. </p>
  
  <p>Thanks</p>
  
  <p><strong>EDIT:</strong> I'm not looking for a way to store the csv data in python, I need to create objects... my example code is a little misleading in that myClass has functions that I'd like to be able to call</p>