On Dec 15, 11:59 am, Miki Tebeka <miki.teb...@gmail.com> wrote: > > My sort issue... as in this doesn't work > > >>> if x.sort == y.sort: > > You're missing the () to make it a function call. > Also list.sort() returns none, it mutates the original list. > You can either > sorted(x) == sorted(y) > or > set(x) == set(y)
I'm pretty sure we don't want to use set() since it throws away duplicates: >>> x = [1,2,3,4] >>> y = [1,1,2,2,3,3,4] >>> sorted(x) == sorted(y) False >>> set(x) == set(y) True -- http://mail.python.org/mailman/listinfo/python-list