title: How to use a function as while loop condition?
body: <p>I have the following code:</p>
  
  <pre><code>def funct():
      print("beggining function")
      a = int(input)
      if a == 1:
          return True
      else:
          return False
  
  while funct():
      #Rest of the code
  </code></pre>
  
  <p>Every time the <code>while</code> loop repeats it executes the function, so it prints "beggining function". I want to avoid this, what can I do?</p>