Generate all subsets of size k (containing k elements) in Python,"list(itertools.combinations((1, 2, 3), 2))"