string - Working with vector output of a function (python) -


i need work different folder paths wrote function create them. unfortunately not able call result vector. gives me "none". uncommenting "#" can see function works fine. guess mistakes lies somewhere in last 2 lines, found searching how store result of function.

any ideas doing wrong? there special consider when saving output of function supposed return vector multiple strings?

i'm using python idle version 2.6.5 if helps...

thank in advance help!

>>> def path_generator(path1,path2,path3):         #res = []         in path1:             first_string =             j in path2:                 second_string = first_string+"\\"+j                 k in path3:                     end_string = second_string+"\\"+k                     #res.append(end_string)         #print res         del i,j,k,first_string,second_string  >>> origin = ["c:\\one","c:\\two"] >>> subfolders = ["subfolder1","subfolder2","subfolder3","subfolder4"] >>> files = ["testfile1.txt","testfile2.txt","testfile3.txt","testfile4.txt"]  >>> result = path_generator(origin,subfolders,files) >>> print result none 

in order function return need tell to, assuming want return list res

so add line return res bottom of function


Comments

Popular posts from this blog

javascript - how to protect a flash video from refresh? -

visual studio 2010 - Connect to informix database windows form application -

android - Associate same looper with different threads -