>>> l1 = [d1,d2,d3]
>>> for d in l1:
for k,v in d.items():
print(k,v)
A better example
d1 = {"a":"A"}
d2 = {"b":"B"}
d3 = {"c":"C"}
l1 = [d1,d2,d3]
for d in l1:
for k,v in d.items():
print("Key = {0}, Value={1}".format(k,v))
Produces
>>>
Key = a, Value=A
Key = b, Value=B
Key = c, Value=C
If they contain only the names of the dictionaries i.e "d1"
you can do something like this (which produces the same result as above):
d1 = {"a":"A"}
d2 = {"b":"B"}
d3 = {"c":"C"}
l1 = ['d1','d2','d3']
for dname in l1:
for k,v in globals()[dname].items():
print("Key = {0}, Value={1}".format(k,v))
Though I wouldn't recommend such an approach. (note: you could also you locals() if the dictionaries were in the local scope)
When you have a dictionary which has a list associated with a key you can go over the list like so:
d1 = {"a":[1,2,3]}
d2 = {"b":[4,5,6]}
l1=["d1","d2"]
for d in l1:
for k,v in globals()[d].items(): #or simply d.items() if the values in l1 are references to the dictionaries
print("Dictionray {0}, under key {1} contains:".format(d,k))
for e in v:
print("\t{0}".format(e))
Producing
Dictionray d1, under key a contains:
1
2
3
Dictionray d2, under key b contains:
4
5
6