Services & Resources / Wolfram Forums
MathGroup Archive
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 1999

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

Search the Archive

Re: equaltity of lists

  • To: mathgroup at
  • Subject: [mg19071] Re: equaltity of lists
  • From: "David Bailey" <db at>
  • Date: Thu, 5 Aug 1999 01:34:57 -0400
  • Organization: University of Salford, Salford, Manchester, UK
  • References: <7o5ih1$>
  • Sender: owner-wri-mathgroup at

Drago Ganic <drago.ganic at> wrote in message
news:7o5ih1$rml at
> Hi !!
> Why don't I get an answer (False) when I ask Mathematica
>     {a,b}=={b,a}
> like the one I get with
>     {1,2}=={2,1}
>     False

x==y only gives a True or False answer if the answer is unequivocally True
or False regardless of any variable assignments you might subsequently make.
Thus in your example setting a and b to 1 would make your two lists equal.
You probably need to use === which tests two expressions for equality as
they are at that instant.

David Bailey
Salford Software

  • Prev by Date: Re: Biased Random[Integer]?
  • Next by Date: Re: equaltity of lists
  • Previous by thread: Re: equaltity of lists
  • Next by thread: Re: equaltity of lists