You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
16 lines
435 B
Python
16 lines
435 B
Python
import os
|
|
import csv
|
|
|
|
|
|
sku_list = []
|
|
with open("product_SKU.csv", "r", encoding="utf-8") as file:
|
|
for line in file:
|
|
sku_strlist = line.split(" ")
|
|
skustr = sku_strlist[-1].strip().replace("\"","")
|
|
sku_list.append(skustr)
|
|
|
|
for sku in sku_list:
|
|
with open("sku_product.csv", mode="a", encoding="utf-8", newline="") as f:
|
|
csv_writer = csv.writer(f)
|
|
csv_writer.writerow([sku,])
|