如果我正确理解了您的问题,那么我想您需要这个:
import os
import pprint
P= ["E:\\GIS_DOCUMENT\\BCAS_Map\\BCAS_All.gdb\\BD_Admin" , "E:\\GIS_DOCUMENT\\BCAS_Map\\BCAS_All.gdb\\BCAS_BD_Infrastructure"]
Cld1 = ['BGD_4_new_district', 'BGD_3_old_district', 'BGD_2_division', 'BGD_1_all', 'BGD_5_Upazilla', 'BGD_4_old_district', 'BGD_6_Union_court', 'BGD_6_Union', 'BD_exposed_coastal_area','BD_drought', 'BGD_1_River', 'BGD_1_River_detail', 'BD_international_bnd', 'BGD_1_River_1', 'BGD_7_Mauza', 'test', 'BGD_5_UpazillaAnno', 'BGD_4_new_districtAnno', 'BGD_4_new_districtAnno2']
Cld2 = ['BD_Health_Infrastructures_1', 'BD_Railway_Establishments_1', 'BGD_roads_1']
lis1 = [os.path.join(x, y) for x in P for y in Cld1]
lis2 = [os.path.join(x, y) for x in P for y in Cld2]
My_Full_Path = lis1 + lis2
pprint.pprint(My_Full_Path)
输出:
['E:\\GIS_DOCUMENT\\BCAS_Map\\BCAS_All.gdb\\BD_Admin\\BGD_4_new_district',
'E:\\GIS_DOCUMENT\\BCAS_Map\\BCAS_All.gdb\\BD_Admin\\BGD_3_old_district',
'E:\\GIS_DOCUMENT\\BCAS_Map\\BCAS_All.gdb\\BD_Admin\\BGD_2_division',
'E:\\GIS_DOCUMENT\\BCAS_Map\\BCAS_All.gdb\\BD_Admin\\BGD_1_all',
'E:\\GIS_DOCUMENT\\BCAS_Map\\BCAS_All.gdb\\BD_Admin\\BGD_5_Upazilla',
'E:\\GIS_DOCUMENT\\BCAS_Map\\BCAS_All.gdb\\BD_Admin\\BGD_4_old_district',
'E:\\GIS_DOCUMENT\\BCAS_Map\\BCAS_All.gdb\\BD_Admin\\BGD_6_Union_court',
'E:\\GIS_DOCUMENT\\BCAS_Map\\BCAS_All.gdb\\BD_Admin\\BGD_6_Union',
'E:\\GIS_DOCUMENT\\BCAS_Map\\BCAS_All.gdb\\BD_Admin\\BD_exposed_coastal_area',
'E:\\GIS_DOCUMENT\\BCAS_Map\\BCAS_All.gdb\\BD_Admin\\BD_drought',
'E:\\GIS_DOCUMENT\\BCAS_Map\\BCAS_All.gdb\\BD_Admin\\BGD_1_River',
'E:\\GIS_DOCUMENT\\BCAS_Map\\BCAS_All.gdb\\BD_Admin\\BGD_1_River_detail',
'E:\\GIS_DOCUMENT\\BCAS_Map\\BCAS_All.gdb\\BD_Admin\\BD_international_bnd',
'E:\\GIS_DOCUMENT\\BCAS_Map\\BCAS_All.gdb\\BD_Admin\\BGD_1_River_1',
'E:\\GIS_DOCUMENT\\BCAS_Map\\BCAS_All.gdb\\BD_Admin\\BGD_7_Mauza',
'E:\\GIS_DOCUMENT\\BCAS_Map\\BCAS_All.gdb\\BD_Admin\\test',
'E:\\GIS_DOCUMENT\\BCAS_Map\\BCAS_All.gdb\\BD_Admin\\BGD_5_UpazillaAnno',
'E:\\GIS_DOCUMENT\\BCAS_Map\\BCAS_All.gdb\\BD_Admin\\BGD_4_new_districtAn
...
...