I am beginer in Python but I would like to convert a lot of csv file to dbf by python-dbf module
. The csv files have different names and I want to get dbf with same name as csv. I tried to carry out this issue with for loop by the following way:
x1 = 'path/to/csv/a.csv'
x2 = 'path/to/csv/b.csv'
x3 = 'path/to/csv/c.csv'
y1 = 'a.dbf'
y2 = 'b.dbf'
y3 = 'c.dbf'
x = [x1,x2,x3]
y = [y1, y2, y3]
for z in range (0,3) : table = dbf.from_csv(x[z], y[z])
Is there any quicker method to solve this issue?