MathGroup Archive 2007

[Date Index] [Thread Index] [Author Index]

Search the Archive

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 &]


  • Prev by Date: Re: A Note of Thanks
  • Next by Date: Summations
  • Previous by thread: Re: Just one "1" in a list
  • Next by thread: Fwd: Just one "1" in a list