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>Did you test this? The function will work properly if the user simply hits <kbd>Enter</kbd>. The <code>sentence</code> variable would be an empty list. If there was nothing else in the function, it would return <code>None</code>, the default return value. If you wanted to do further processing that requires an actual sentence with content, you can put <code>if not sentence: return</code> after that line.</p>

python