is_singleton

mathtools.is_singleton(argument)

Is true when argument is a tuple of length 1. Otherwise false.

>>> mathtools.is_singleton((19,))
True
>>> mathtools.is_singleton((19, 20, 21))
False

Returns true or false.