read numbers from text file python -


I am trying to read a text file and return the contents of the text file. There is a matrix in the text file when I run my code with the file, it prints the first line, my code looks correct and I have searched online and I think of finding this problem.

The code is:

  DIF (main): matrix = "matrix 1w" print (remetrics (matrix) def readMatrix (matrix): matrix file = open (matrix , "R") line = matrixFile.readline () line! = "": Return line line = matrixFile.readline () matrixFile.close () main ()  

You mean

  while the line! = "P> 
  while line! =" ": Print line  

Comments

Popular posts from this blog

c# - SignalR: "Protocol error: Unknown transport." when navigating to hub -

class - Kivy: how to instantiate a dynamic classes in python -

python - mayavi mapping a discrete colorbar on a surface -