Sep-01-2017, 08:07 PM
Ok, i went to deep xD
Work perfectly, thank to all of you, you are all amazing!
I will be more prepared the next time !!
I cant thank you guys enought
weeks = list(range(1, 52)) tracking = {week_num: 0 for week_num in weeks} assignments = [ ] for preferences in [[1, 2, 3, 4, 5], [1, 2, 3, 4, 5], [1, 2, 3, 4], [1, 2, 3, 4], [1, 2, 3, 4], [1, 2, 3, 4]]: assignments.append([ ]) print('assignments: {}'.format(assignments)) for week_num in preferences: if tracking[week_num] < 3: assignments[-1].append(week_num) tracking[week_num] += 1 if len(assignments[-1]) == 2: break[[1, 2], [1, 2], [1, 2], [3, 4], [3, 4], []]
Work perfectly, thank to all of you, you are all amazing!
I will be more prepared the next time !!
I cant thank you guys enought