Thanks, works exactly what I needed.
-----Original Message-----
From: py***********************************@python.org
[mailto:py***********************************@pytho n.org] On Behalf Of
s0****@gmail.com
Sent: Tuesday, May 20, 2008 12:22 PM
To:
py*********@python.org
Subject: Re: Removing Space and "-" from a string
On May 20, 11:02 am, "Ahmed, Shakir" <shah...@sfwmd.govwrote:
I have thousands of records in MS Access database table, which records
I
am fetching using python script. One of the columns having string like
'8 58-2155-58'
Desired output: '858215558'
I want to remove any spaces between string and any dashes between
strings. I could do it in access manually but want to do from python
script
Any help is highly appreciated.
string.replace('-', '').replace(' ', '')
--
http://mail.python.org/mailman/listinfo/python-list