title: Parsing CSV to list of tuples without using CSV module
body: <p>I'm working on an assignment in a Python class at the moment, and one particular part is asking me to import a CSV file (with data in the format of "text, number, number, ..., number, number") without the use of the CSV module (or any modules at all, in fact), and return the data as a list of tuples, in this format:</p>
  
  <pre><code>[(’Text’, [number, number, ..., number, number]),
  (’Text’, [number, number, ..., number, number]),
  .....]
  </code></pre>
  
  <p>I think I've got the actual process of opening the file and beginning to read it line by line correct (see snippet below), but I'm not quite sure on how to proceed with regards to parsing each line into the format needed.</p>
  
  <pre><code>def load_data(filename):
      open(filename)
      for line in filename
  </code></pre>
  
  <p>I've tried searching for help but the only help I can seem to find says to just use the CSV module (which isn't particularly helpful because we're not allowed to import any modules bar the math library) or has the data being input and/or output in a different format. If anyone could give me some pointers as to what I should be doing or where I can start that would be super helpful. Thanks!</p>
  
  <p>EDIT: Per the suggestion made by @dotancohen here is some sample data:</p>
  
  <pre><code>Slow Loris, 21.72, 29.3, 20.08, 29.98, 29.85, 26.22, 29.68
  Ocelot, 57.51, 47.59, 55.89, 47.15, 46.71, 51.7, 46.68, 54.54
  Tiger, 75.0, 82.43, 112.11, 89.93, 103.19, 80.6, 113.44, 75.55, 102.29, 108.1, 98.84, 101.48, 77.75, 98.57, 70.31, 78.28, 80.18
  </code></pre>
  
  <p>Also below is what I have at the moment as a potential solution:</p>
  
  <pre><code>def load_data(filename):
      open(filename) as file
      output = []
      for line in filename
          temp_list = line.split(',')
          temp_item = temp_list.pop(0)
          tup = (temp_item, temp_list)
          output.append(tup)
      return output
  </code></pre>