def conf_dir_exist(lines):
temp = ''
print(lines) #isso é uma tuple.
for line_a in lines:
for line_b in line_a:
if(os.path.exists(line_b) != False):
pass
else:
temp += ''.join(line_b + '; ')
print('\n\tDirectory ' + str(line_a) + ' < ' + temp + '> not exist.')
if __name__ == '__main__':
conf_dir_exist((['w:/', 'g:/', 'd:/', 'x:/', 'y:/'], ['c:/data', 'd:/data']))
Given that directories: 'w: /', 'd: / e' d: / data 'do not exist as directories like appending to a string in another one during the internal looping and displaying the result at the end of even looping.