OpenMaple/Python/Indexable/__len__ - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : OpenMaple/Python/Indexable/__len__

__len__

test for membership in the Indexable

 

Calling Sequence

Parameters

Description

Examples

Calling Sequence

x.__len__()

len(x)

Parameters

x

-

Indexable object

Description

• 

__len__ returns the number of elements in the Indexable x.

• 

This function can also be called by simply entering len(x).

Examples

The following interactive session illustrates the use of __len__:

>>> import maple

>>> import maple.namespace

>>> S = maple.execute('{3,4,2*Pi,sqrt(2)};')

>>> S.__len__()

4

>>> len(S)

4

See Also

OpenMaple

OpenMaple/Python/API

OpenMaple/Python/Expression

OpenMaple/Python/Indexable

OpenMaple/Python/Indexable/__contains__

OpenMaple/Python/Indexable/__iter__