title: How to stop a function in a while loop in python
body: <p>Basically I want to stop a function but not by terminating the script.</p>
  
  <pre><code>While True:
    do function A()
    do function B()
    if ( condition ):
      function B.stop()
  </code></pre>
  
  <p>What I mean is when the condition is met, the while loop still runs but in the next iteration of the while loop, it only does function A, no longer does it do function B. I wonder if we can archive this in python?
  Thanks </p>