Skip to main content

Check Collection Length At Least N

Validates that a student’s collection has at least N elements, optionally enforcing a collection type.

Device Type
Jupyter

Variables:

Variable NameVariable DescriptionTypeRequired?Default
student_collection_variable_nameThe name of the student’s collection variable (list, tuple, etc.).strYes
nThe minimum number of elements expected.intYes
collection_typeOptional: a Python type to enforce (e.g. 'list'). If omitted, the type is not enforced.strNo

Examples: