Collection Interface ABCs
collections.abc.Sequence
Ordered sequence interface with indexed access and length; provides iteration, membership, index and count mixins to direct subclasses.
Formal Syntax & Structure
python syntaxpython
collections.abc.SequenceReturn Value
type
Abstract base class object representing the described interface; use it for recognition or inheritance.
Working Example
Example Snippetpython
import collections.abcprint(isinstance((1,2),collections.abc.Sequence))