def Logical_drives(): return { "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')]) ] ]} unmarshaler = { "Logical_drives": Logical_drives }