title: How can I create an array/list of dictionaries in python?
body: <p>I have a dictionary as follows:</p>
  
  <pre><code>{'A':0,'C':0,'G':0,'T':0}
  </code></pre>
  
  <p>I want to create an array with many dictionaries in it, as follows:</p>
  
  <pre><code>[{'A':0,'C':0,'G':0,'T':0},{'A':0,'C':0,'G':0,'T':0},{'A':0,'C':0,'G':0,'T':0},...]
  </code></pre>
  
  <p>This is my code:</p>
  
  <pre><code>weightMatrix = []
  for k in range(motifWidth):
      weightMatrix[k] = {'A':0,'C':0,'G':0,'T':0}
  </code></pre>
  
  <p>But of course it isn't working. Can someone give me a hint? Thanks. </p>