Returning function values based on argument?
<p>I am having this problem in the below program flow where func1 needs list3,list4 but I dont want to return them from func2 because it affects the sanctity of func2,is there a way we can return based on some conditions?global is one way but that wont work for me because I will calling these functions with different values,lists being returned depends on the operations performed on value..what other options I have?</p>

<pre><code>def func3 (value):
    list3=[]
    list4=[]
    #do some operations based on value
    return list3,list4

def func2 (value,flag):
    list1=[]
    list2=[]
    value=10
    #do some operations based on value
    if flag:
        (list3,list4)=func3(value)
    return list1,list2

def func1() :
    value =20
    (list1,list2)= func2(value,1)
    #func1 needs list3 and list4

def main():
    func1()

if __name__ == '__main__':
    main()
</code></pre>
