next line, new line

rasdj at frontiernet.net rasdj at frontiernet.net
Sun Jan 30 23:21:49 EST 2005


Thanks Jeremy, something like this would work:

try:
lines = [ line.replace(",\n;", ")\n;") for line in input  ]

If I could figgure out how to:

IF ':' in line
READ next line in
lines = [ line.replace(",\n;", ")\n;") for line in input  ]
output.write(str.join('', lines))

because there are lots of "comma newline" but the only ones I want are
the ones that follow the semicolon.

RasDJ




More information about the Python-list mailing list