compare two ordered lists python