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 =
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
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
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
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
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