Re: Pattern to match element in nested list
- To: mathgroup at smc.vnet.net
- Subject: [mg122836] Re: Pattern to match element in nested list
- From: "Harvey P. Dale" <hpd1 at nyu.edu>
- Date: Fri, 11 Nov 2011 07:33:38 -0500 (EST)
- Delivered-to: l-mathgroup@mail-archive0.wolfram.com
- References: <201111110954.EAA08487@smc.vnet.net>
If lst is the list, Select[lst, Last[#]==0&] will do this for you. Best, Harvey -----Original Message----- From: JasonE [mailto:ebaughjason at gmail.com] Sent: Friday, November 11, 2011 4:55 AM To: mathgroup at smc.vnet.net Subject: [mg122836] Pattern to match element in nested list This is pretty basic and I am surprised at myself that I can't figure this out, but I guess its where I am at. What pattern would pick students with a score of zero out of this list (which is {"student", score}): {{"Smith, Tim",3},{"Wheres,Waldo",4},{"Muffet, LilMiss",0},{"Brown, Charlie",1},{"X, Doctor",0}} Thanks, Jason Contact: jasonebaugh at jasonebaugh.info Blog: www.jasonebaugh.info/wordpress/ LinkedIn: www.linkedin.com/in/jasonebaugh
- References:
- Pattern to match element in nested list
- From: JasonE <ebaughjason@gmail.com>
- Pattern to match element in nested list