skbio.sequence.GrammaredSequence.__bool__#

GrammaredSequence.__bool__()[source]#

Return truth value (truthiness) of sequence.

Returns:
bool

True if length of sequence is greater than 0, else False.

Examples

>>> from skbio import Sequence
>>> bool(Sequence(''))
False
>>> bool(Sequence('ACGT'))
True