I'm trying to write a Python script that will perform the same action on multiple databases. There are too many for me to input them by hand, so I'd like to write a script that will loop over them. Right now, I've gotten as far as the following before getting stuck:
countylist = ['01001','01002','01003','01004']
for item in countylist:
# Local variables...
file_1 = "F:\\file1.shp"
file_2 = "F:\\fileCOUNTYLIST.shp"
output_2 = "F:\\outputCOUNTYLIST.shp"
Basically, I need the items to go where I wrote COUNTYLIST (so the program would call "F:\file01001.shp", "F:\file01002.shp", etc). I couldn't find an answer online. How do I do this?
Thanks a lot!