Is regularish X36643


Statement
 

pdf   zip

html

A list containing wordlists, for example:

[["a"], ["one", "two", "more"], ["eo", "ai"]]

is regularish when all the words in each sublist have the length of this sublist.

Design a function es_regulin(llpals) which, given a list of wordlists llpals, returns True when llpals is regularish.

Sample session
>>> lp = [["a"], ["uno", "dos", "mas"], ["eo", "ai"]]
>>> es_regulin(lp)
True
>>> lpals=[[]]
>>> es_regulin(lpals)
True
>>> L=[["a"], ["uno", "dos", "tres"], ["eo", "ai"]]
>>> es_regulin(L)
False
Information
Author
InfBesos
Language
English
Translator
Original language
Spanish
Other languages
Catalan Spanish
Official solutions
Python
User solutions
Python