I have a dict like this:
{'ABC': array([
[ 0.,1.,2.],
[ 3.,4.,5.],
[ 6.,7.,8.]]),
array([
[ 0.,1.,2.],
[ 3.,4.,5.],
[ 6.,7.,8.]])
'DEF': array([
[ 0.,1.,2.],
[ 3.,4.,5.],
[ 6.,7.,8.]]),
array([
[ 0.,1.,2.],
[ 3.,4.,5.],
[ 6.,7.,8.]])}
and I want to have a new like this:
['ABC','ABC','DEF','DEF']
with each key corresponding to each element in the value and get duplicated.
I tried:
[(key,val) for (key,val) in d1.items()]
but the key didn't get duplicated