title: Defining Multiple Dictionaries Within a Loop in Python
body: <p>What I'm looking to do is to define three very similar dictionaries with only subtle differences. If you recognize this it is one of the problems from the Codeacademy course on Python, and I'm looking to do it a little more elegantly. Anyways, here's what I have:</p>
  
  <pre><code>import string
  for name in ["lloyd", "alice", "tyler"]:
      name = {"name": string.capitalize(name), "homework": [], "quizzes": [], "tests": []}
  </code></pre>
  
  <p>This isn't working. What I want is three dictionaries, which have the names "lloyd" "alice" and "tyler" and with keys of their names (but capitalized), "homework", "quizzes", and "tests"</p>
  
  <p>To clarify, the output I want is equivalent to this:</p>
  
  <pre><code>lloyd = {"name": "Lloyd", "homework": [], "quizzes": [], "tests": []}
  alice = {"name": "Alice", "homework": [], "quizzes": [], "tests": []}
  tyler = {"name": "Tyler", "homework": [], "quizzes": [], "tests": []}
  </code></pre>