title: Difference between while not __ and while __ == false ? (python)
body: <p>I am trying to distinguish between different ways of writing while loops.</p>
  
  <p>I am writing this specifically for a poker game where I distinguish between different hand types. When writing my <code>is_pair</code> function, I start by saying <code>pair = False</code>. The only way I have found that continues the loop is if I say <code>while pair == False: ...</code>. For my <code>is_flush</code> function I am able to set <code>flush = True</code> and the <code>while</code> loop runs on <code>while flush</code> which continues the loop until <code>flush</code> is not true any more. </p>
  
  <p>I have tried <code>while not pair:</code> but that didn't work. I want it to continue while <code>pair</code> is <code>False</code> so when it has found a pair it will return as <code>True</code>.</p>
  
  <p>I think the statement for <code>flush</code> just looks cleaner and I am wondering if there is another way to incorporate that style into my pair function. </p>