convertion from dictionary to list preserving elements
I've a problem with convertion from this:
Counter({('pintor', 'NCMS000'): 1, ('ser', 'VSIS3S0'): 1, ('muralista',
'AQ0CS0'): 1, ('diego_rivera', 'NP00000'): 1, ('frida_kahlo', 'NP00000'):
1, ('caso', 'NCMS000'): 1})
that is obtained from this code:
res = collections.Counter(map(tuple, listaPalabras)) return res
But what I need is a list in this form:
[['pintor', 'NCMS000', 1], ['ser', 'VSIS3S0', 1], ['muralista', 'AQ0CS0',
1], ['diego_rivera', 'NP00000', 1], ['frida_kahlo', 'NP00000', 1],
('caso', 'NCMS000', 1]]
Thanks in advanced!
No comments:
Post a Comment