title: How do I save specific text in an array from .txt file
body: <p>I have a .txt file, where I want to save only following characters "N", "1.1" ,"XY", "N", "2.3" ,"xz" in an array.
  The .txt file looks like this:</p>
  
  <pre><code>[   TITLE
  
      N 1.1 XY
      N 2.3 XZ
  
  ]
  </code></pre>
  
  <p>Here is my code:</p>
  
  <pre><code>src = open("In.txt", "r")
  
  def findOp (row):
      trig = False
      temp = ["", "", ""]
      i = 1
      n = 0
      for char in row:  
          i += 1
          if (char != '\t') &amp; (char != ' ') &amp; (char != '\n'):
              trig = True
              temp[n] += char
          else:
              if trig:
                  n += 1
                  trig = False
  
      return temp
  
  for line in src.readlines():
  print(findOp(line))
  </code></pre>
  
  <p>The Output from my code is:</p>
  
  <pre><code>['[', 'TITLE', '']
  ['', '', '']
  ['N', '1.1', 'XY']
  ['N', '2.3', 'XZ']
  ['', '', '']
  [']', '', '']
  </code></pre>
  
  <p>The problem is the program also saves whitespace characters in an array which i dont want.</p>