Array programming
Vijay Chandra Sekhar Parepalli
vcsekhar007 at yahoo.com
Sat May 7 08:44:14 EDT 2005
Thank you, Sakesun.
-----Original Message-----
From: Sakesun Roykiattisak
[mailto:sakesun at boonthavorn.com]
Sent: Saturday, May 07, 2005 12:17 PM
To: V.C.Sekhar
Cc: python-list at python.org
Subject: Re: Array programming
V.C.Sekhar wrote:
>Hi there,
> I couldnt get to do the following task using
Python. Can some pls
>suggest me a way to do this.
>
>I have an array with duplicate strings filled in it.
Now am looking for
>a way to extract only the DISTINCT Values from that
array.
>
>Could some one pls help me out.
>
>Thanks in advance,
>Sekhar
>
>
>
>
try use "set" or "frozenset", if you use python2.4
or try "sets.Set" or "sets.ImmutableSet", if you use
python2.3
>>> import sets
>>> s = sets.Set([1,1,2,3,2,4])
>>> for x in s: print x
1
2
3
4
__________________________________
Do you Yahoo!?
Yahoo! Mail - Find what you need with new enhanced search.
http://info.mail.yahoo.com/mail_250
More information about the Python-list
mailing list