Re: Removing Space and - from a string

2008-05-21 Thread inhahe
[EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Shakir, 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

Re: Removing Space and - from a string

2008-05-21 Thread Paul Hankin
On May 20, 5:02 pm, Ahmed, Shakir [EMAIL PROTECTED] wrote: 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

Re: Removing Space and - from a string

2008-05-21 Thread Terry Reedy
Paul Hankin [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] On May 20, 5:02 pm, Ahmed, Shakir [EMAIL PROTECTED] wrote: 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'

Removing Space and - from a string

2008-05-20 Thread Ahmed, Shakir
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

Re: Removing Space and - from a string

2008-05-20 Thread s0suk3
On May 20, 11:02 am, Ahmed, Shakir [EMAIL PROTECTED] wrote: 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

RE: Removing Space and - from a string

2008-05-20 Thread Ahmed, Shakir
Thanks, works exactly what I needed. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED] Sent: Tuesday, May 20, 2008 12:22 PM To: python-list@python.org Subject: Re: Removing Space and - from a string On May 20, 11:02 am, Ahmed, Shakir

Re: Removing Space and - from a string

2008-05-20 Thread python
Shakir, 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

Re: Removing Space and - from a string

2008-05-20 Thread Scott David Daniels
[EMAIL PROTECTED] wrote: Shakir, I have thousands of records in MS Access database table, which records I am fetching using python script. [A] columns has strings like '8 58-2155-58' Desired output: '858215558' input = '8 58-2155-58' output = ''.join( [ c for c in input if c not in ' -' ] )