Collection Interface ABCs

collections.abc.KeysView

Mapping view of keys, with membership and set-like behavior. Dictionary key views reflect subsequent mapping changes.

Formal Syntax & Structure

python syntaxpython
collections.abc.KeysView

Return Value

type

Abstract base class object representing the described interface; use it for recognition or inheritance.

Working Example

Example Snippetpython
import collections.abcprint(isinstance({"x":1}.keys(),collections.abc.KeysView))
Python Reference