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