import pandas as pd
result=[]
f = open('testdata.txt')
for line in open('testdata.txt'):
line = f.readline()
a = line.split(':')[1]
print(a)
a = a.split(' ')[0]
result.append(a)
print(result)
result = pd.DataFrame(result)
result.to_excel('data.xls')
result=[]
f = open('testdata.txt')
for line in open('testdata.txt'):
line = f.readline()
a = line.split(':')[1]
print(a)
a = a.split(' ')[0]
result.append(a)
print(result)
result = pd.DataFrame(result)
result.to_excel('data.xls')