title: How can you bypass an input prompt in Python3 when there is no option to skip the input?
body: <p>Using a library that when I call a certain function that I will call <code>foo()</code> , I am prompted for input as such:</p>
  <pre class="lang-py prettyprint-override"><code>def foo():
     if input(&quot;Proceed?&quot;) == 'yes':
          take_action()
  </code></pre>
  <p>I am required to pass in an answer to continue.</p>
  <p>But I would like to be able to loop over <code>foo()</code> with a default value to feed the prompt.</p>
  <p>The problem is the developers did not provide an option to supply a default value for the prompt.</p>
  <p>Ideally they would have written <code>foo()</code> like this:</p>
  <pre class="lang-py prettyprint-override"><code>def foo(default_response=None):
      if default_response == 'yes':
          take_action()
      elif input(&quot;Proceed?&quot;) == 'yes':
          take_action()
  </code></pre>
  <p>Given that they did not supply an option for a default response, is there a way for me to loop over <code>foo()</code> and provide the input automatically without changing the source code?</p>