forked from DGNum/gestioCOF
Move choices_length
to shared folder
This commit is contained in:
parent
730611039b
commit
4da5add25a
4 changed files with 8 additions and 12 deletions
5
shared/utils.py
Normal file
5
shared/utils.py
Normal file
|
@ -0,0 +1,5 @@
|
|||
from functools import reduce
|
||||
|
||||
|
||||
def choices_length(choices):
|
||||
return reduce(lambda m, choice: max(m, len(choice[0])), choices, 0)
|
Loading…
Add table
Add a link
Reference in a new issue