[Tutor] New to Python..Need help
Felisha Lawrence
felisha.lawrence at gmail.com
Thu Sep 4 14:49:04 CEST 2014
Hello,
I have a question regarding strings in python. I have a directory on my
MacBook Bro of about 13 files. I need to alter the file endings in
that directory. The files are on the order of
'swp.113006004000_KLWX_0.0.5_PPI_v2','swp.113006004000_KLWX_0.0.5_PPI_v3'.
I need to remove the characters after the 'v' and replace with v20. All of
the endings of the files are sequential _v2, _v3,_v4, _v5. I need all of
these characters to be the same (i.e. v20). I would like to know which
modules are best to use, and how to use loops to alter them. Any help you
can provide would be great.
Thanks,
Felisha Lawrence
--
Felisha Lawrence
Howard University Program for Atmospheric Sciences(HUPAS), Graduate Student
NASA URC/BCCSO Graduate Fellow
NOAA NCAS Graduate Fellow
Graduate Student Association for Atmospheric Sciences(GSAAS), Treasurer
(240)-535-6665 (cell)
felisha.lawrence at gmail.com (email)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20140904/046d8eee/attachment.html>
More information about the Tutor
mailing list