Reputation: 49
I am initializing a list of dictionaries with:
sequences = [dict() for x in range(83)]
I want to be able to add key : value
pairs to a certain dictionary. For example, I want to add the key value pair primer 1 : primer 2
to the first slot in the list.
sequences[0].update({ primer1 : primer2 })
This gives me the error TypeError: unhashable type: 'list'
. How am I able to access a certain dictionary within the list to add a key value pair?
Upvotes: 3
Views: 1122