擅长:python、mysql、java
<p>您可以使用<strong>regex</strong></p>
<pre><code>import re
from operator import itemgetter
filename = open("abc.txt", 'r')
read_file = filename.readlines()
for each_line in read_file:
a, b, c, d = itemgetter(0,1,2,3)(re.findall("<[0-9]*>", each_line))
print a, b, c, d
</code></pre>
<p>输出</p>
<pre><code><1600506070> <399767> <1600506070> <457014>
<1600506070> <457135> <1600506070> <530369>
<1600506070> <530506> <1600506070> <603211>
</code></pre>