Ask Your Question

Revision history [back]

Use sets, not lists:

sage: set([1, 2, 3, 4])
{1, 2, 3, 4}
sage: set([2, 3, 4, 1])
{1, 2, 3, 4}
sage: set([1, 2, 3, 4]) == set([2, 3, 4, 1])
True