title: Multiple For loops, print else only once if condition is not met
body: <p>There is a loop in a loop, if condition is met some code runs. However, if condition is not met, I need it to print something. Though if I add code to any location, it is printed multiple times. How to make it print only once, if condition is not met?</p>
  
  <pre><code>some_list = {'a_list': [{'name': 'Tom', 'age': 25}, {'name': 'John', 'age': 25}, {'name': 'Val', 'age': 25}], 'b_list': [{'name': 'Don', 'age': 25}, {'name': 'Tim', 'age': 25}, {'name': 'San', 'age': 25}]}
  
  findperson = 'San'
  
  for i in some_list:
      for y in some_list[i]:
          if y['name'].lower() == findperson.lower():
              print('Friend found')
              break
  else:            
      print('Friend not found')
  </code></pre>