Re: Just one "1" in a list
- To: mathgroup at smc.vnet.net
- Subject: [mg78226] Re: Just one "1" in a list
- From: chuck009 <dmilioto at comcast.com>
- Date: Tue, 26 Jun 2007 04:32:47 -0400 (EDT)
Here's one way: lista = {{1, 2}, {1, 3}, {2, 3}, {2, 1}, {1, 1, 2}, {1, 2, 2}, {2, 1}}; Select[lista, Count[#, 1] == 1 &]