Macaulay2 » Documentation
Packages » Python :: length(PythonObject)
next | previous | forward | backward | up | index | toc

length(PythonObject) -- returns the length of a python object

Synopsis

Description

This is equivalent the Python len function.

i1 : length pythonValue "'Hello, world!'"

o1 = 13
i2 : length pythonValue "[1,2,3,4,5]"

o2 = 5

Ways to use this method: