- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
def count_dupes(serials):
dupes = {}
for item in serials:
if dupes.get(item):
dupes[item] = dupes.get(item) + 1
else:
dupes[item] = 1
return dupes
factory = Functions.get_factory()
for serial in dupes:
for row in factory:
if serial == row['serial']:
result[serial] = row
keys = row.keys()
for key in keys:
if not row[key] == 0:
print(key, row[key])