>> Is there a 'substitute' function in python.
> You can do this with the translate() method of a string.
That was the clever stuff I was trying to remember, not a module
after all, a method!
Thanks Kent,
Alan G.
___
Tutor maillist - Tutor@python.
> Is there a 'substitute' function in python.
Assuming we are dealing with strings then there are two.
The string objects provide a replace() method and the
regulatr expression module re provides substitute.
> I want to substitute A with T and G with C and vice
> versa
>
> A -> T
> G -> C
> T -
ot; <[EMAIL PROTECTED]>
> Cc:
> Sent: Sunday, July 31, 2005 2:46 PM
> Subject: Re: [Tutor] substitute function
>
>
> > Srinivas Iyyer wrote:
> > > Hello group:
> > >
> > > Is there a 'substitute' function in python.
> > >
> >
Are you making a biology program Srinivas?
- Original Message -
From: "Kent Johnson" <[EMAIL PROTECTED]>
Cc:
Sent: Sunday, July 31, 2005 2:46 PM
Subject: Re: [Tutor] substitute function
> Srinivas Iyyer wrote:
> > Hello group:
> >
> > Is th
Srinivas Iyyer wrote:
> Hello group:
>
> Is there a 'substitute' function in python.
>
> For example:
> I want to substitute A with T and G with C and vice
> versa
>
> A -> T
> G -> C
> T -> A
> c -> G
You can do this with the translate() method of a string. It is a two-step
process. First you
Hello group:
Is there a 'substitute' function in python.
For example:
I want to substitute A with T and G with C and vice
versa
A -> T
G -> C
T -> A
c -> G
thanks
Start your day with Yahoo! - make it your home page
http://