例如:考虑 file1.txt 的内容:
1 0 9227 1152 34 2
2 111 7622 1120 34 2
3 68486 710 1024 14 2
6 265065 3389 800 22 2
7 393152 48438 64 132 3
8 412251 46744 64 132 3
9 430593 50866 256 95 4
10 430730 10770 256 95 4
11 433750 12701 256 14 3
12 437926 2794 64 34 2
13 440070 43 32 96 3
14 440102 44 32 96 3
15 440357 43 32 96 3
16 440545 43 32 96 3
17 440599 43 32 96 3
18 440625 43 32 96 3
19 440999 84 32 96 0
20 441574 44 32 96 3
`````````````````````````````````````````
`````````````````````````````````````````
`````````````````````````````````````````
`````````````````````````````````````````
`````````````````````````````````````````
`````````````````````````````````````````
其中包含n
具有6
字段的作业(即列(0-5))
现在,例如,我将前 19 个工作作为历史。然后我需要从 20 日开始阅读,以此类推,比较3,4,5
历史中与上述职位匹配的列。如果它像示例中的第 20 个作业与历史记录中的 6(13,14,15,16,17,18) 6 个作业匹配,那么现在我需要创建一个仅包含 column2 的匹配作业的列表?
任何人都可以建议一个python中的代码,我可以通过它阅读第20行并与上述历史记录进行比较并继续21,22,23------------------
直到到达文件末尾......