Re: problem parsing lines in a file

2007-12-12 Thread Kees Bakker
barronmo wrote: I'm having difficulty getting the following code to work. All I want to do is remove the '0:00:00' from the end of each line. Here is part of the original file: 3,3,Dyspepsia NOS,9/12/2003 0:00:00 ... 20,3,Bubonic plague,11/11/2003 0:00:00 output =

Re: problem parsing lines in a file

2007-12-12 Thread barronmo
Thanks everyone. I learned several things on this one. I ended up using the .replace() method and got the results I wanted. Thanks again, Michael Barron -- http://mail.python.org/mailman/listinfo/python-list

problem parsing lines in a file

2007-12-11 Thread barronmo
I'm having difficulty getting the following code to work. All I want to do is remove the '0:00:00' from the end of each line. Here is part of the original file: 3,3,Dyspepsia NOS,9/12/2003 0:00:00 4,3,OA of lower leg,9/12/2003 0:00:00 5,4,Cholera NOS,9/12/2003 0:00:00 6,4,Open wound of ear

Re: problem parsing lines in a file

2007-12-11 Thread Diez B. Roggisch
barronmo wrote: I'm having difficulty getting the following code to work. All I want to do is remove the '0:00:00' from the end of each line. Here is part of the original file: 3,3,Dyspepsia NOS,9/12/2003 0:00:00 4,3,OA of lower leg,9/12/2003 0:00:00 5,4,Cholera NOS,9/12/2003 0:00:00

Re: problem parsing lines in a file

2007-12-11 Thread Chris
On Dec 11, 7:25 pm, barronmo [EMAIL PROTECTED] wrote: I'm having difficulty getting the following code to work. All I want to do is remove the '0:00:00' from the end of each line. Here is part of the original file: 3,3,Dyspepsia NOS,9/12/2003 0:00:00 4,3,OA of lower leg,9/12/2003 0:00:00

Re: problem parsing lines in a file

2007-12-11 Thread Matimus
This result is a copy of ProblemList without any changes made. What am I doing wrong? Thanks for any help. rstrip doesn't work the way you think it does help(str.rstrip) Help on method_descriptor: rstrip(...) S.rstrip([chars]) - string or unicode Return a copy of the string S