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# - XML serialize base class without knowing derived class -

c# - UnhandledExceptionMode.ThrowException for AppDomain.UnhandledException -

udp - The relationship between MTU and size of skb in xmit function -