title: How do I make the elements in one list equal the elements of the other list with loops?
body: <p>So I'm trying to define a function so that the elements of a list</p>
  
  <p><code>elements = ['H', 'N', 'C', 'O']</code> 
  equal to the elements in another list in the same positions</p>
  
  <p><code>molarMass = [1.00794, 14.0067, 12.0107, 15.9994]</code></p>
  
  <p>So that H = 1.00794, N = 14.0067, etc..</p>
  
  <p>Edit:
  trying to define a function example:
  <code>elementMolarMass(elementSymbol)</code>
  that when used will look like this 
  <code>elementMolarMass('H')</code>
  and it returns the corresponding element from the first list and match with the element in the other list that is in the same position
  <code>1.00794</code>.
  Not sure how to even begin with that.</p>