Commit f2dfed37 authored by Carsten Dittrich's avatar Carsten Dittrich
Browse files

when fsr fits perfectly in attendance list no white entries are needed

parent 7afdd877
......@@ -47,14 +47,17 @@ def resort_fsr(fsr, num_cols=5):
"""
resort list of names by pascal style
"""
fsr += [""] * (num_cols - len(fsr) % num_cols)
num_empty = num_cols - len(fsr) % num_cols
if num_empty == num_cols:
num_empty = 0
fsr += [""] * num_empty
depth = len(fsr) // num_cols
tmp = [[] for i in range(depth)]
for index, elem in zip(range(len(fsr)), fsr):
tmp[index % depth] += [elem]
print(tmp)
return [j for i in tmp for j in i]
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment