The task is to make a list of every lotto row if in a lotto, seven numbers are chosen from 39 numbers. Is there more elegant way to do this than my solution:
rows = []
for a in range(1,40):
for b in range(a+1,40):
for c in range(b+1,40):
for d in range(c+1,40):
for e in range(d+1,40):
for f in range(e+1,40):
for g in range(f+1,40):
rows.append([a,b,c,d,e,f,g])