code = '[[' + ','.join(vars) + '] for ' + vars[0] + ' in range(%d) ' % top
Python: find all sets of numbers inside a range where each set contains values that are x distance apart and don't exceed the range