how to use returned values from python
<p>So I have a function like this one below called analysis1.py :</p>

<pre><code>import glob
import panda as pd   
def my_function(test_path):
    path=test_path +"\\"+ "*mainlog.txt"
    files =glob.glob(path)
    for name in files:
        lines=[line.rstrip('\n')for line in open(name)]
        if "a:" in lines:
            k_1=pd.Dataframe1
            return k_1
        elif "b:" in lines:
            k_2=pd.Dataframe2
            return k_2
        elif "c:" in lines:
            k_3=pd.Dataframe3
            return k_3
        elif "d:" in lines:
            k_4=pd.Dataframe4
            return k_4
        elif "e:" in lines:
            k_5=pd.Dataframe5
            return k_5
</code></pre>

<p>I want to make a code that finds out what is returned from the function and use the returned value to calculate some stuff. Each returned value is used to calculate something different like in a different code store in the same directory as the previous and named main_code.py : </p>

<pre><code>returned_value = analysis1.my_function(test_path)
if returned_value == k_1:
    do_something_1
if returned_value == k_2:
    do_something_2
if returned_value == k_3:
    do_something_3
if returned_value == k_4:
    do_something_4
if returned_value == k_5:
    do_something_5
</code></pre>

<p>What can I add to this code that can help me to know what is returned and use it solve the problems shown. I know am missing something small but can't quite figure out what it is.</p>