All pastes #734627 Raw Edit

Untitled

public text v1 · immutable
·published 2007-10-12 21:47 UTC
rendered paste body

unmarshaler = {
"Logical_drives": lambda x: { "Free Space": [ ([t[0].text for t in type], zip([e[0].text for e in free] ,[f[0].text for f in total]) ) 
                                                for free, total, type in [
                                                    ([child.findall('Free_bytes') for child in x.findall('Drive')],
                                                    [child.findall('Total_bytes') for child in x.findall('Drive')],
                                                    [child.findall('Drive_type') for child in x.findall('Drive')])
                                                                ] 
                                                ]}
    }                                           
    

this is returned:
{'Free Space': [(['2', '3', '3', '5', '5', '4'], [('0', '0'), ('13790306304', '34685972480'), ('3918094336', '5360582656'), ('0', '577288192'), ('0', '0'), ('2255486976', '63412633600')])]}

but what I am trying to get out are only the tuples ('13790306304', '34685972480') and ('3918094336', '5360582656')
the identifier being the '3''s of the first list in the outer tuple