Path: csiph.com!x330-a1.tempe.blueboxinc.net!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!news.glorb.com!news-out.readnews.com!transit3.readnews.com!panix!gordon From: John Gordon Newsgroups: comp.lang.python Subject: Re: test for list equality Date: Thu, 15 Dec 2011 17:57:02 +0000 (UTC) Organization: PANIX Public Access Internet and UNIX, NYC Lines: 19 Message-ID: References: <45d59336-7e75-4865-8573-56742b37097c@s26g2000yqd.googlegroups.com> <61edc02c-4f86-45ef-82a1-61c7013003b4@t38g2000yqe.googlegroups.com> NNTP-Posting-Host: panix2.panix.com X-Trace: reader1.panix.com 1323971822 21311 166.84.1.2 (15 Dec 2011 17:57:02 GMT) X-Complaints-To: abuse@panix.com NNTP-Posting-Date: Thu, 15 Dec 2011 17:57:02 +0000 (UTC) User-Agent: nn/6.7.3 Xref: x330-a1.tempe.blueboxinc.net comp.lang.python:17287 In <61edc02c-4f86-45ef-82a1-61c7013003b4@t38g2000yqe.googlegroups.com> noydb writes: > My sort issue... as in this doesn't work > >>> if x.sort =3D=3D y.sort: > ... print 'equal' > ... else: > ... print 'not equal' > ... > not equal > ??? Use x.sort() instead of x.sort . -- John Gordon A is for Amy, who fell down the stairs gordon@panix.com B is for Basil, assaulted by bears -- Edward Gorey, "The Gashlycrumb Tinies"