title: Read in from a file into table of tables
body: <p>So I have this txt file with elements and the year they were discovered like hydrogen 1766
  helium 1868
  and many more. I have to read the file and return a table of tables, represeting this information from the file something like this 
  { { "Hydrogen", 1766 }, { "Helium", 1868 }, ... { "Bromine", 1825 }, { "Krypton", 1898 } }
  but what I have so far its just the name and the year right below it. I have this so far</p>
  
  <pre><code>function read_elements(f_name)
      elements = {}
      f_name = io.open('elements.txt')
      for line in f_name:lines()do
          for word in string.gmatch(line, "%w+") do
              table.insert(elements,word)
          end
      end
      for key,value in pairs(elements) do
          print(value..",")
      end
      f_name:close()
  end   
  </code></pre>
  
  <p>I've been told to hold each pair in their own table and insert those tables into the larger table, but I really don't know what to do next or how to do it. please help</p>