Re: [Tutor] problem with using set

2011-10-13 Thread Prasad, Ramit
Original Message- From: tutor-bounces+ramit.prasad=jpmorgan@python.org [mailto:tutor-bounces+ramit.prasad=jpmorgan@python.org] On Behalf Of Prasad, Ramit Sent: Thursday, October 13, 2011 10:09 AM To: tutor@python.org Subject: Re: [Tutor] problem with using set Approach:- >&

Re: [Tutor] problem with using set

2011-10-13 Thread Dave Angel
On 10/13/2011 10:44 AM, Praveen Singh wrote: 2. a='microsoft' set(a) set(['c', 'f', 'i', 'm', 'o', 's', 'r', 't']) print ''.join(set(a)) cfimosrt When i print "Hello", i get the output as "helo"(in same sequence) but when i write "microsoft" i get this-"cfimosrt". So, it means i can't pred

Re: [Tutor] problem with using set

2011-10-13 Thread delegbede
+1 Ramit. Sent from my BlackBerry wireless device from MTN -Original Message- From: "Prasad, Ramit" Sender: tutor-bounces+delegbede=dudupay@python.org Date: Thu, 13 Oct 2011 11:09:24 To: tutor@python.org Subject: Re: [Tutor] problem with using set Approach:- >>>

Re: [Tutor] problem with using set

2011-10-13 Thread Prasad, Ramit
Approach:- >>> a='hello' >>> set(a) set(['h', 'e', 'l', 'o']), so i am thinking somehow if i remove 'l' and i join the string, i will get the desired output. 2. >>> a='microsoft' >>> set(a) set(['c', 'f', 'i', 'm', 'o', 's', 'r', 't']) >>> print ''.join(set(a)) cfimosrt When i print "Hello", i g

Re: [Tutor] problem with using set

2011-10-13 Thread delegbede
What exactly do you intend to get as an output? Sent from my BlackBerry wireless device from MTN -Original Message- From: Praveen Singh Sender: tutor-bounces+delegbede=dudupay@python.org Date: Thu, 13 Oct 2011 10:44:53 To: Subject: [Tutor] problem with using set ___