Collection Interface ABCs
collections.abc.Collection
Sized, iterable containers that implement __len__, __iter__ and __contains__.
Formal Syntax & Structure
python syntaxpython
collections.abc.CollectionReturn 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.Collection))