Home > other >  Python in multiple columns more rows of data in the form of group into a list
Python in multiple columns more rows of data in the form of group into a list

Time:09-22

Such as:

This data into

CodePudding user response:

The above image into the following form is not to become the data below

CodePudding user response:

Read the file data, using readlines line, if the form data, some sweat, take out the data, their combination into a list format elements,

CodePudding user response:

Readlines ()
One-time read the entire file; Automatic analysis of the contents of the documents into a line list,
Readlines () reads all rows and then use them as a string is returned list.
  • Related