title: Search in text file by date
body: <p>I have code like this:</p>
  
  <pre><code>from datetime import datetime
  from tabulate import tabulate
  
  def search_projection_date():
      projections = open('projections.txt','r').readlines()
      date = input("Input projection date: ")
      try:
          date = date.strptime(date, "%d.%m.%Y.")
      except:
          print("Date input error!")
          #search_projection_date()
      for i in projections:
          projections = i.strip("\n").split("|")
          if date == projections[2]:
              table = [['Code:',projections[0]],['Hall:',projections[1]],['Date:',projections[2]],['Start time:',projections[3]],['End time:', projections[4]],['Day(s):', projections[5]], ['Movie:', projections[6]], ['Price:', projections[7]]]
              print (tabulate(table))
              #break
      else:
          print("No projection on that date")
  </code></pre>
  
  <p>And text file like this:</p>
  
  <pre class="lang-none prettyprint-override"><code>0001|AAA|17.12.2017.|20:30|21:00|sunday|For a few dolars more|150
  0002|BBB|17.12.2017.|19:30|21:15|saturday|March on the Drina|300
  0003|GGG|19.12.2017.|18:00|19:00|tuesday|A fistful of Dolars|500
  0004|GGG|16.12.2017.|21:15|00:00|sunday|The Good, the Bad and the Ugly|350
  </code></pre>
  
  <p>I try to search movie projections by date...
  If there is a projection on the entered date it will find it and print the list, but before printing that list it will always print "Date input error" and after that list "No projection on that date". (if I put <code>break</code> in <code>if</code> statement it will print only the first found projection on entered day, withouth <code>else</code> statement, obvious)</p>
  
  <p><strong>Questions</strong>: How to print ONLY list of projections without "date input error" if date is correctly input.
  How to print only "No projection on that date" if date is correct but there is no projection and how to ask user for input that until puts it correctly? In this way with recursion it will always throw exception and recursion <code>search_projection_date()</code> function.</p>