Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #....
- #...
- # Write CSV header
- writer.writeheader()
- # Loop through the product data list
- for product in product_data:
- # Write a new row with product name and price
- writer.writerow({'Product Name': product['name'], 'Price': product['price']})
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement