title: Different number of return values in Python function
body: <p>Is it okay/good practice to return different number of return values from a function in Python? If yes, how should the caller handle the return values? e.g.</p>
  
  <pre><code>def func():
      if(condition_1):
          return 1,2
      if(condition_2):
          return 1
      if(condition_3):
          return 1,2,3,4
  </code></pre>
  
  <p><strong>Note:</strong>
  condition_1,condition_2 and condition_3 are local to the function func so the caller has no idea how many values will be returned.</p>