Close
Close window
__len__ - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Mozilla Firefox.
Maplesoft logo
Maplesoft logo

Online Help

All Products Maple MapleSim


[フレーム] [フレーム]

__len__

test for membership in the Expression

Calling Sequence

x.__len__()

len(x)

Parameters

x

-

Expression object

Description

__len__(x) returns the length of the Expression x as returned by the length function.

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

Examples

The following interactive session illustrates the use of __len__:

>>> import maplesoft.maple as mpl

>>> import maplesoft.maple.namespace as msymbol

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

>>> # It is most natural to use len as a function in prefix form without underscores

>>> len(S)

4

>>> # It may however also be used with the expr.methodName syntax

>>> S.__len__()

4


Download Help Document

AltStyle によって変換されたページ (->オリジナル) /