title: Why my other function still running went i break the loop in my main function
body: <p>The example code that I used
  the main idea is when the user enters the wrong input, it will return a menu choice to let the user back to main_menu or continue
  but when i want to enter data and choose back to main_menu and try to terminate it, the TenantID function still running</p>
  <pre><code>def TenantID():              
      while True:       
          error_list = []      
          tenant_id = str(input(&quot;1.Enter your Tenant ID: &quot;))
          if ValidateTenantID(tenant_id, error_list):
             print(*error_list)
             if MenuChoice() is True:
                menu()
             else:
                continue
          else:
              break
       return tenant_id
  
  
  def MenuChoice(): 
      Choice = input(&quot;\x1B[1m&quot; + &quot;Press M return to main menu or Any key 
                    to continue: &quot; + '\x1B[0m')
      if Choice in [&quot;M&quot;, &quot;m&quot;]:
          return True
      else:
          return False
  
  def ValidateTenantID(tenant_id, error_list):
      returnValue = CheckLength(tenant_id)
      if returnValue is True:
         returnValue = CheckTenantID(tenant_id)
         if returnValue is True:
         returnValue = CheckDataIfExist(tenant_id)
             if returnValue is not True:
             error_list.append(returnValue)
          else:
              error_list.append(returnValue)
       else:
          error_list.append(returnValue)
  
       return error_list
  </code></pre>
  <p><a href="https://i.stack.imgur.com/fl9Sq.png" rel="nofollow noreferrer">The problem</a></p>