Python function calling
<p>I've only started learning Python. If I wrote:</p>

<pre><code>def questions(): 
    sentence= input(" please enter a sentence").split()
</code></pre>

<p>How would I end the function If the user didn't input anything and just hit enter </p>

<p>You can add exception in your code.
If you want to raise an exception only on the empty string, you'll need to do that manually:</p>

<p>Example</p>

<pre><code> try:
    input = raw_input('input: ')
    if int(input):
        ......
except ValueError:
    if not input:
        raise ValueError('empty string')
    else:
        raise ValueError('not int')
</code></pre>

<p>try this, both empty string and non-int can be detected. </p>

python