> From: [EMAIL PROTECTED] > > I want to remove the commas, and square brackets [ and ] > characters and > rewrite this whole line (and all the ones following in a text file > where only space would be a delimiter. How do I do this ? >
If all you want to do to the data as you read in and write out a line, how about string.replace('[',' ')? x = 'as[df]as,df' x = x.replace(']',' ') x = x.replace('[',' ') x = x.replace(',',' ') ___________________________________________________________________ The information contained in this message and any attachment may be proprietary, confidential, and privileged or subject to the work product doctrine and thus protected from disclosure. If the reader of this message is not the intended recipient, or an employee or agent responsible for delivering this message to the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please notify me immediately by replying to this message and deleting it and all copies and backups thereof. Thank you. -- http://mail.python.org/mailman/listinfo/python-list