Advertisement
dereksir

Untitled

Aug 25th, 2023 (edited)
135
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.31 KB | None | 0 0
  1. #....
  2.     #...
  3.      
  4.         # Write CSV header
  5.         writer.writeheader()
  6.        
  7.         # Loop through the product data list
  8.         for product in product_data:
  9.             # Write a new row with product name and price
  10.             writer.writerow({'Product Name': product['name'], 'Price': product['price']})
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement