```
class Solution(object):
def combine(self, n, k):
res=[]
self.cal([i for i in xrange(1,n+1)], k, [], res)
return res
def cal(self, lst, k, temp, res):
if k>len(lst): return
if k==0: res+=temp,
for i in xrange(len(lst)): self.cal(lst[i+1:], k-1, temp+[lst[i]], res)
```