title: Icecream sales report Files (Python)
body: <p><em>EDIT 11/25/2015</em></p>
  
  <pre><code>def main():
      outfile=open('icecreams.txt','w')
      sales_report1={'Vanilla':[8580.0,7201.25,8900.0]}
      sales_report2={'Chocolate':[10225.25,9025.0,9505.0]}
      sales_report3={'Rocky Road':[6700.1,5012.45,6011.0]}
      sales_report4={'Cookie Dough':[7901.25,4267.0,7056.5]}
      outfile.write(str(sales_report1)+'\n')
      outfile.write(str(sales_report2)+'\n')
      outfile.write(str(sales_report3)+'\n')
      outfile.write(str(sales_report4)+'\n')
      outfile.close()
      print('Data written to file') 
  main()
  
  #read list of icecreams
  def main():
      infile=open('icecreams.txt','r')
      sales_report1=str(infile.readline())
      sales_report2=str(infile.readline())
      sales_report3=str(infile.readline())
      sales_report4=str(infile.readline())
      total=sales_report1
      infile.close()
      print(total)
      print(sales_report1,sales_report2,sales_report3,sales_report4)
  main()
  </code></pre>
  
  <p>It prints out this:  </p>
  
  <pre><code>Data written to file
  {'Vanilla': [8580.0, 7201.25, 8900.0]}
  
  {'Vanilla': [8580.0, 7201.25, 8900.0]}
   {'Chocolate': [10225.25, 9025.0, 9505.0]}
   {'Rocky Road': [6700.1, 5012.45, 6011.0]}
   {'Cookie Dough': [7901.25, 4267.0, 7056.5]}
  </code></pre>
  
  <p>However I need to add up the sales of each icecream, but when I print the total it prints everything in sales_report1 does this mean that dictionaries is not a good idea in this case?</p>