How to make a script automatically restart itself?
<p>How do you make a python program automatically restart itself? So let's say there is a really simple program like:</p>
<pre><code>var = input(&quot;Hi! I like cheese! Do you like cheese?&quot;).lower()
if var == &quot;yes&quot;:
    print(&quot;That's awesome!&quot;)
</code></pre>
<p>Now, in a Python Shell, you would have to press either the <kbd>Run</kbd> button and then 'Run Module (F5)' or just the <kbd>F5</kbd> key on your keyboard. That is the first time you run it. When the program ended, you would go back to your <code>Cheese.py</code> file and then press <kbd>F5</kbd> to run the program again.</p>
<p>Everybody with me here?
OK, so my question is, how do you make the program restart itself automatically without you having to manually do it?</p>