f=open(‘/home/xbwang/Desktop/all_vectors‘,‘r‘)
while True :
line=f.readline()
if line == None : break
a=line.split()
b=a[0]
print(b)
f1=open(‘/home/xbwang/Desktop/a.txt‘,‘a‘)
f1.write(b+‘\n‘)
时间: 2024-10-22 08:45:28
f=open(‘/home/xbwang/Desktop/all_vectors‘,‘r‘)
while True :
line=f.readline()
if line == None : break
a=line.split()
b=a[0]
print(b)
f1=open(‘/home/xbwang/Desktop/a.txt‘,‘a‘)
f1.write(b+‘\n‘)