0
Good night!
There is a file with numbers, save in txt format, each number separated by space, with a list with about 50 values in each line of the txt file (and more than 10,000 lines in the file): 78 34 85 67 96 197 etc
I want to create a python program that compares 3 variables within the program with each line of the txt file. If the program reaches the end of all lines of the text file and does not find the 3 values, it will return the 3 search parameters in an output file, increments the variables in the loop and starts again.
For example, the program starts running with variables 30 31 and 32. It scans line by line. If you arrive at the end of the last line of the text file and you have not found the 3 values, return these values in an output file and resume parsing the text file with the value of one of the variables incremented. If you find the 3 values before the end line of the file, interrupt the search, increment the variable and resume the search on the first line of the file.
You can post the code you already tried and the specific problem you had that stopped you from reaching the end?
– Pedro von Hertwig Batista
And it wasn’t as clear as the output that should be generated. You can create a [mcve], placing part of the file with the numbers, an example of the input and which should be the output?
– Woss