title: Print out message only once from the for loop
body: <p>I want to find if a specific string is contained inside the elements of a list. If the string is found, I want to print out "String found", otherwise "String not found".
  But, the code I came up with, makes multiple prints of "String not found". I know the reason why, but I don't know how to fix it and print it only one of the messages once.</p>
  
  <pre><code>animals=["dog.mouse.cow","horse.tiger.monkey",
           "badger.lion.chimp","trok.cat.    bee"]
        for i in animals :
            if "cat" in i:
                print("String found")
            else:
                print("String not found")
  </code></pre>
  
  <p>~                                                   </p>