[Tutor] selecting specific items from a list

Julieta Rangel julieta_rangel@hotmail.com
Tue, 08 May 2001 07:33:08 -0500


Let's say I have the following list:

[(3,3),(2,0),(5,5), (1,1), (4,5), (a,a), (a,e), (b,b), (c,d)]

How can I tell the computer to return to me only those items in the list for 
which x==y.  That is, [(3,3), (5,5), (1,1), (a,a), (b,b)].

It's a dumb question, but somebody's got to ask it :)

Julieta
_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com