[python] How can I compare two ordered lists in python?