Untitled
public text v1 · immutabledef t(x):
physicals = []
free = []
total = []
type = []
for child in x.findall('Drive'):
free.append(child.findall('Free_bytes'))
total.append(child.findall('Total_bytes'))
type.append(child.findall('Drive_type'))
pairs = zip([e[0].text for e in free],[f[0].text for f in total])
i = 0
for p in pairs:
if type[i][0].text == '3':
physicals.append(p)
i += 1
return { "Free Space": physicals}