<human>:  What's the most memory efficient way to generate the combinations of a set in python?
<bot>: Here is some code to generate the combinations of 3 from a set `{1, 2, 3, 4}`

print(list(itertools.combinations({1, 2, 3, 4}, 3)))

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