Cartesian product of two or more lists: Difference between revisions