Вывод в виде двух списков:
import re
file_object = open("over.txt",'rU')
df1=[]
df2=[]
content = ''
try:
for line in file_object:
content = content + line
finally:
file_object.close()
words = re.split(pattern="\n\n\n", string=content)
num = re.sub(pattern="\s+", repl=",", string=words[0])
for i in num.split(","):
df1.append(float(i))
num = re.sub(pattern="\s+", repl=",", string=words[1])
for i in num.split(","):
df2.append(float(i))
print df1
print df2
Вывод:
[0.0, 0.0, 0.004999999888241291, 0.008771448750876555, 1.0, 0.0005000000237487257, 0.5087714487508765]
[0.015625, 0.0, 0.004999999888241291, 0.008462251310635788, 1.0, 0.0005000000237487257, 0.5086403995308509]