title: Iterating over a list in file.txt
body: <p>I’m trying to create a simple program where the user can enter their name, available weekday and time during those days and based on the appointments in the data.txt file append their name to the list.</p>
  <p>The error is :</p>
  <pre><code>Exception has occurred: UnsupportedOperation
  not readable( When the program read's the lines in data_file.
  </code></pre>
  <pre><code>data.txt = [[&quot;Dinner&quot;, &quot;Friday&quot;, &quot;2000&quot;], []]
             [[&quot;Workout&quot;, &quot;Sunday&quot;, &quot;1200&quot;], []]
  
  
  def Make_Apointment(person_name, available_day, available_time):
          data_file = open(&quot;data.txt&quot;,&quot;a&quot;)
  
          for line in data_file.readlines():
              if line[0][1] in available_day and available_time in line[0][2]:
                  line[1].write(person_ name)
  </code></pre>