OOF2: The Manual
Name
Python lists — Python syntax for a list of objects
Synopsis
[a,b,c, ...]
Description
A list in Python is written as a comma-separated series of
objects within square brackets ([]
).
Examples
-
[1,2,3]
is a list of integers. -
[Point(1.23, 4.56)]
is a list containing a singlePoint
object. -
[[1,2,3], [4,5,6], [7,8]]
is a list of lists of integers. -
[]
is an empty list.