    reports = {'products': [], 'updates': []}

# ... тут заполняем reports ...

    for title, vals in reports.items():
        with open(f'{title}.csv', 'w') as fh:
            writer = csv.writer(fh, delimiter=',', lineterminator='\n')
            writer.writerow(['product', 'variant', 'inventory', 'url'])
            writer.writerows(vals)

