import os from os import path newgdb = outfold+os.sep+"RESULT.gdb" if not path.exists(newgdb): arcpy.CreateFileGDB_management(outfold, "RESULT.gdb")