Thanks all, after reading all the posting and suggestions for alternatives, I think I'll be going with sorted(a)==sorted(b) it seems fast, intuitive and clean and can deal with duplicates too. Best, Esmail