Re: [Tutor] need idea

2010-02-10 Thread Andre Engels
On Thu, Feb 11, 2010 at 12:12 AM, invincible patriot wrote: > thanks > let me clear you that what i am trying to do > suppose we hav a input string and a dict > our_dict={'a':'u', 't':'a', 'c':'g', 'g':'c'} > input_string='atcg' > > > now what i wana do is that where ever we are having 'a' i wana

Re: [Tutor] need idea

2010-02-10 Thread invincible patriot
e ever we are having 'a' i wana replace it with 'u', 't' with 'a' and so on i tried using input_string.replace('a', 'u') but it is replacing only one character i wana replace these 4 characters according to the dictionary i hope it is now clea

Re: [Tutor] need idea

2010-02-10 Thread Andre Engels
On Wed, Feb 10, 2010 at 10:27 PM, invincible patriot wrote: > hi > i want to compare a string with a dictionary > or u can say that i want to take user input A STRING, and want to compare > each character of that string with the KEYS  in the dictionary, and then i > wana print the values for the c

Re: [Tutor] need idea

2010-02-10 Thread Kent Johnson
On Wed, Feb 10, 2010 at 4:27 PM, invincible patriot wrote: > hi > i want to compare a string with a dictionary > or u can say that i want to take user input A STRING, and want to compare > each character of that string with the KEYS  in the dictionary, and then i > wana print the values for the ch

[Tutor] need idea

2010-02-10 Thread invincible patriot
hi i want to compare a string with a dictionary or u can say that i want to take user input A STRING, and want to compare each character of that string with the KEYS in the dictionary, and then i wana print the values for the characters that are present in that strinng that we got as the input