<human>:  Generate all subsets of size k (containing k elements) in Python
<bot>: Here is some code to generate all 2-element subsets of tuple `(1, 2, 3)`

list(itertools.combinations((1, 2, 3), 2))

#Warning: this code generation is experimental. Please inspect the code for any bugs before executing.