def tuples2dict(tuplelist):
  """ Convert list of 2-tuples to dictionary equivalent.

      Parameters:
        tuplelist - list of 2-tuples [(val1, val2), ...]

      Return Value:
        Dictionary of {val1:val2, ...}
  """
  d = {}
  for name,value in tuplelist:
    d[name] = value
  return d