Is there a compact way in Python to "multiply" two lists A and B such that every possible combination of elements has some operation applied to it, such that the resulting list has size A*B? I've only found answers in how to combine the nth element of each.
# arguments:
list_x = [a, b, c, d]
list_y = [1, 2, 3, 4]
# returns:
list_xy = [a1, a2, ..., d3, d4]