Skip to main content

Check Collection Length Greater Than N

Validates that a student’s collection (list, tuple, etc.) has a length strictly greater than N, optionally enforcing a specific collection type.

Device Type
Jupyter

Variables:

Variable NameVariable DescriptionTypeRequired?Default
student_collection_variable_nameThe name of the student’s collection variable.strYes
nThe length must be strictly greater than this integer.intYes
collection_typeOptional: a Python type to enforce (e.g. 'list'). If not provided, only the length is checked.strNo

Examples: