shahmed at sfwmd
May 20, 2008, 9:38 AM
Post #4 of 8
Thanks, works exactly what I needed.
From: python-list-bounces+shahmed=sfwmd.gov [at] python
[mailto:python-list-bounces+shahmed=sfwmd.gov [at] python] On Behalf Of
s0suk3 [at] gmail
Sent: Tuesday, May 20, 2008 12:22 PM
To: python-list [at] python
Subject: Re: Removing Space and "-" from a string
On May 20, 11:02 am, "Ahmed, Shakir" <shah...@sfwmd.gov> wrote:
> I have thousands of records in MS Access database table, which records
> 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
> Any help is highly appreciated.
string.replace('-', '').replace(' ', '')