when writing a crawler program, there are multiple contents in the same directory. How to use with open river data to automatically save in different Excel?
for example, I want to use with open to create different tables, such as Beijing .xls; Shanghai .xls; Guangzhou .xls; and so on
, but I can"t implement
the code is as follows
global city
for city in ("","",""):
path=str(r"C:\Users\Batman\Desktop\city.csv")
with open(path,"a",encoding="ANSI") as f:
f.close()
but you can only get one city.csv
is there any solution?