Generate all combinations of positive and negative
Generate all combinations of positive and negative Question: I have this list of tuples a = [(1, 2), (2, 1)] And need all of the possible combinations of negative and positive: b = [(1, 2), (1, -2), (-1, 2), (-1, -2), (2, 1), (2, -1), (-2, 1), (-2, -1)] I’ve tried using itertools.product(): xs = …