title: What are non-pure functions in Python?
body: <p>As a definition, I learnt that,</p>
  <blockquote>
  <p>non-pure functions have some input (their arguments) and return some output (the result of applying them) <em>[...]</em> and in addition <em>[...]</em> can also generate side effects, <em>which make some change to the state of interpreter or computer</em>.</p>
  </blockquote>
  <p>(Paraphrased from <em><a href="http://www-inst.eecs.berkeley.edu/%7Ecs61a/sp12/book/functions.pdf" rel="nofollow noreferrer">Building Abstractions with Functions (PDF)</a></em>.)</p>
  <p>For example: the <code>print(2)</code> function returns nothing (<code>None</code>) in addition as a side effect print function (not Python interpreter) itself prints the value.</p>
  <p>In the above definition, I did not understand the meaning of 'changing the state of interpreter or computer'. What does that mean?</p>