# Creating file geodatabases using list as filenames in ArcPy?

I'm trying to create multiple file geodatabases from a list in arcgis. When I run the script I get a box that pops up asking for a name to be input (not what I want).

How do I reference each item in the list as a name for each fDGB?

I'm fairly certain the problem is in out_name, but, since I'm a novice, there could be other issues.

My code is as follows:

import os
import sys
import arcpy

arcpy.env.workspace = "myfilepath"
arcpy.env.overwriteOutput = True

fd = []
for i in range(1980, 2101):
fd.append(i)

out_folder_path = "myfilepath"
out_name = (".gdb" %fd)

arcpy.CreateFileGDB_management(out_folder_path, out_name, "Current")


The main issues are that you were working outside of the for loop and you were improperly concatenating strings. Try this:
import os, sys, arcpy