Aug-07-2022, 02:35 PM
Hello everyone,
I have multiple text files with a lot of lines.
Inside I have numbers separate with space or multiple spaces.
For example :
1 2 3 4 5 9
7 10 15 8 87
14 58 69 10 100
To simplify, let's say we have 3 files. I would like to do the following steps :
Thank you for your help
I have multiple text files with a lot of lines.
Inside I have numbers separate with space or multiple spaces.
For example :
1 2 3 4 5 9
7 10 15 8 87
14 58 69 10 100
To simplify, let's say we have 3 files. I would like to do the following steps :
- Open the first file
- Read line by line and find all numbers.
- Append these numbers to a list of integers, but keep the same order.
- Then attach this list to a dictionary
- Do the same tasks for the 2 others files and then save the dictionary which contains the 3 lists in a text file.
Thank you for your help