Joining data from three different files to be written into three Columns
Dawn Abbott
whiterabbott at gmail.com
Sun Dec 3 20:59:30 EST 2006
Everything works in my program except for when it prints out the number is
surrounded by brackets but I need to print the number without the brackets.
Does anyone know an easy way to do this?
#!/usr/bin/env python
import array
fin = open('relative_x.INT32','rb')
fin1=open('relative_y.INT32','rb')
fin2=open('income.INT32','rb')
outfile=open('test.txt','w')
data=[]
data1=[]
data2=[]
while True:
try:
myInts=array.array('l')
myInts.fromfile(fin,1)
data.append(myInts.tolist())
myInts1=array.array('l')
myInts1.fromfile(fin1,1)
data1.append(myInts1.tolist())
myInts2=array.array('l')
myInts2.fromfile(fin2,1)
data2.append(myInts2.tolist())
data3=zip(data,data1,data2)
except EOFError:
break
for record in data:
print record[0],record[1],record[2]
thanks
Dawn
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20061203/cd082d5f/attachment.html>
More information about the Python-list
mailing list