Any way to tell whether a Python function returns a value
<p>I am a newbie to Python. 
Here is a function, it could return a list of values or just return nothing in different occasions. How could I know which occasion the function runs.</p>

<p>I tried:</p>

<pre><code>ans = foo()
if ans == null:
     # blablabla
</code></pre>

<p>But failed.</p>
