Not sure if the tittle is 100% correct, please correct me if im wrong
I have a small python script as follows
x = 0 #counter
with open('products(x).csv', 'w') as csvfile:
I'm trying to make it output
product0.csv
I have a loop set up the increases the value of x
x += 1
So what I'm hoping is it will create product0.csv product1.csv product2.csv
Etc, etc.
I have tried
with open('products'(x)'.csv', 'w') as csvfile:
And I just recieve an error
File "web.py", line 30
with open('products'(x)'.csv', 'w') as csvfile:
^