Re: [Tutor] substitute function

2005-07-31 Thread Alan G
>> 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.

Re: [Tutor] substitute function

2005-07-31 Thread Alan G
> 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 -

Re: [Tutor] substitute function

2005-07-31 Thread Srinivas Iyyer
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. > > > > >

Re: [Tutor] substitute function

2005-07-31 Thread luke
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

Re: [Tutor] substitute function

2005-07-31 Thread Kent Johnson
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

[Tutor] substitute function

2005-07-31 Thread Srinivas Iyyer
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://