title: What is the use of the "-O" flag for running Python?
body: <p>Python can run scripts in optimized mode (<a href="https://docs.python.org/3/using/cmdline.html?highlight=pythonoptimize#cmdoption-O" rel="nofollow noreferrer"><code>python -O</code></a>) which turns off debugs, removes <a href="https://docs.python.org/3/reference/simple_stmts.html#assert" rel="nofollow noreferrer"><code>assert</code></a> statements, and IIRC it also removes docstrings.</p>
  <p>However, I have not seen it used. Is <code>python -O</code> actually used? If so, what for?</p>