all_are_nonnegative_integers

mathtools.all_are_nonnegative_integers(expr)

Is true when expr is a sequence and all elements in expr are nonnegative integers.

>>> mathtools.all_are_nonnegative_integers([0, 1, 2, 99])
True

Otherwise false:

>>> mathtools.all_are_nonnegative_integers([0, 1, 2, -99])
False

Returns true or false.