__reversed__
iterate over list in reverse order
Calling Sequence
Parameters
Description
Examples
x.__reversed__()
reversed(x)
x
-
List object
__reversed__ function returns a Python Iterator object for the List x.
This is similar to __iter__ but performs the iteration is reverse order.
This function can also be called by simply entering reversed(x).
The following interactive session illustrates the use of an reversedator used implicitly in a for-in loop over the container structure.
>>> import maple
>>> import maple.namespace
>>> reversed( maple.execute('[3,4,2*Pi,sqrt(2)];') )
See Also
OpenMaple
OpenMaple/Python/API
OpenMaple/Python/Expression
OpenMaple/Python/List
OpenMaple/Python/List/index
Download Help Document