title: Can you use a while loop on a dictionary in python?
body: <p>If a value for one of the keys in my dictionary does satisfies a condition, I want to break out of the loop and set a property to <code>True</code>.</p>
  
  <p>what I'm doing so far is:</p>
  
  <pre><code>fooBar = False
  for key, value in my_dict.items():
      if (condition):
          fooBar = True
  </code></pre>
  
  <p>Do I need to use a for loop and iterate through all items in the dictionary, or can I use a while loop?</p>