SyntaxFix
Write A Post
Hire A Developer
Questions
Just use the classic == operator:
==
>>> [0,1,2] == [0,1,2] True >>> [0,1,2] == [0,2,1] False >>> [0,1] == [0,1,2] False
Lists are equal if elements at the same index are equal. Ordering is taken into account then.