Alistair Alistair - 1 year ago 107
Python Question

In Python, what does it mean if an object is subscriptable or not?

Which types of objects fall into the domain of "subscriptable"?

Answer Source

It basically means that the object implements the __getitem__() method. In other words, it describes objects that are "containers", meaning they contain other objects. This includes lists, tuples, and dictionaries.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download