You're almost there, just a few minor things. The algorithm is basically correct, but
if k == len(lst): return lst
This is the wrong type. The return type is not a list of things, but a list (list of things), so it should be
if k == len(lst): return [lst]
Further
if k == 0: return []
Each list has exactly one non-empty sublist, an empty list, so it should be
if k == 0: return [[]]
For the rest
if k > len(lst): return []
is completely correct.
sets=[] sub_lst=lst[:] sub_lst.remove(sub_lst[0])
This is correct, but can be stated more briefly:
sub_lst = lst[1:]
Now, another type of mix-up:
a= choose_sets(sub_lst,k-1) for i in a: i.append(lst[0]) sets.append(a)
That sets.append(a) puts a in one sets slot, you want to merge the two lists, sets = sets + a . And if you need combinations in the order in which the items appear in the list, and not i.append(lst[0]) , you should add [lst[0]] + i to sets in the loop, but this is a tilt issue.
b= choose_sets(sub_lst,k) sets.append(b)
Again, don’t add, but concatenate here,
sets = sets + b