Jul-15-2020, 11:57 AM
Hey guys,
I have grouped files which meets some requirements and i have it stored, but now i don't know how to seperate them from each other.
ForProfile_file = C:\Users\user\Desktop\Tax scripts\2020\Hungary\ICS\Work\Hungary profile inflation 2020.xls
TaxCheck_file = C:\Users\user\Desktop\Tax scripts\2020\Hungary\ICS\Hungary_taxcheck_20.xlsm
I have grouped files which meets some requirements and i have it stored, but now i don't know how to seperate them from each other.
#loop through collected in the list "for profile" files and "taxcheck" files for x in prof_list, taxc_list: if country1 == country2: paired_country_directory = x test = paired_country_directory[2] print(test)
Output:C:\Users\user\Desktop\Tax scripts\2020\Hungary\ICS\Work\Hungary profile inflation 2020.xls
C:\Users\user\Desktop\Tax scripts\2020\Hungary\ICS\Hungary_taxcheck_20.xlsm
I wonder how can i split them into variables, so it would be equal as below:ForProfile_file = C:\Users\user\Desktop\Tax scripts\2020\Hungary\ICS\Work\Hungary profile inflation 2020.xls
TaxCheck_file = C:\Users\user\Desktop\Tax scripts\2020\Hungary\ICS\Hungary_taxcheck_20.xlsm