Py5Vector.tolist()#

Return the vector’s values as a list.

Examples#

1v1 = py5.Py5Vector(1, 2, 3)
2
3print(v1.tolist())
4# [1.0, 2.0, 3.0]
5
6print(type(v1.tolist()))
7# <class 'list'>

Description#

Return the vector’s values as a list. The length of the list will be equal to the vector’s dimension.

Syntax#

tolist() -> list[float]

Updated on January 16, 2022 16:51:21pm UTC