I am trying to pass two lists to other functions. in one function it is executing as I am calling the total function using self. But I shouldn't call the same function in another method too, as the git clone will happen twice. Hence I need to pass the function return values to other function. Is there any way to do this? This total code I am writing in single class.
def open_close_lists(self):
cmd = self.git_clone
subprocess.check_output(cmd, shell=True)
open_list = os.listdir('open')
close_list = os.listdir('close')
return open_list, close_list
I have another two functions
def fun1(self):
here I need to use those two lists
def fun2(self):
here I need to use those two lists