title: Call a function inside a loop, but cannot return the results
body: <p>I have a function, say <code>func(var)</code> which returns 3 dataframes according to the variable I input.</p>
  
  <p>For example, if I write</p>
  
  <pre><code>df_a,df_b,df_c = func(7)
  </code></pre>
  
  <p>I will get three dataframes.</p>
  
  <p>However, if I call the function inside a for loop, I could not get back the result.</p>
  
  <p>For example,</p>
  
  <pre><code>for i in range(1,4):
      df_a_i, df_b_i, df_c_i = func(i)
  </code></pre>
  
  <p>I could not get back <code>df_a_1</code> or anything else.I get an error</p>
  
  <pre><code>NameError: name 'df_a_1' is not defined
  </code></pre>
  
  <p>etc.</p>
  
  <p>If I try to call it manually, that is </p>
  
  <pre><code>df_a_1, df_b_1, df_c_1 = func(1)
  df_a_2, df_b_2, df_c_2 = func(2)
  df_a_3, df_b_3, df_c_3 = func(3)
  df_a_4, df_b_4, df_c_4 = func(4)
  </code></pre>
  
  <p>which is completely fine.</p>
  
  <p>What's wrong with my code?</p>