title: How to create matrix from table in .txt file
body: <p>I need to create a matrix from a text file.
  the "delimiter" are not constant, sometimes it is 5 spaces and sometimes more or less.
  dose any one know how to do it?</p>
  
  <p>I just have the lines separated, by using this code:</p>
  
  <pre><code>from tkinter import filedialog
  
  # getting file loction and name from user:
  file_path = 'file_path'
  file = open(file_path) # open the file
  lines = file.readlines()
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/9eOPP.png" alt="enter image description here"></p>
  
  <p>I expect the output of matrix with 5 rows and 3 columns.</p>