[ create a new paste ] login | about

Link: http://codepad.org/SywZpzER    [ raw code | fork ]

Python, pasted on Jun 21:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
from collections import deque


db_list = deque(range(16))
node1list = []
node2list = []
node3list = []


while len(db_list) > 0:
    if len(node1list) < 5:
        node1list.append(db_list.popleft())
    elif len(node2list) < 5:
        node2list.append(db_list.popleft())
    elif len(node3list) < 5:
        node3list.append(db_list.popleft())


Create a new paste based on this one


Comments: