newbie question concerning formatted output

wittempj@hotmail.com martin.witte at gmail.com
Tue Nov 29 19:39:32 CET 2005


You can try something like:
#!/usr/bin/python
import sys
inp = open("xyplan.nobreaks")
data = [ i.strip() for i in inp if i ]
while data:
    print ' '.join(data[0:3])
    del data[0:3]




More information about the Python-list mailing list