Array Class Reference
Defines a true one-dimensional array with a limited number of operations similar those provided in other languages. The elements of the array, which store Python references, can be accessed using normal subscript notation, Public Methods
Detailed DescriptionArray(size)
Creates a one-dimensional array with elements organized in linear order. The number of elements in the array is provided as an argument and each element is initialized to
None . The elements of the array are accessed by index or position with the first element having an index of 0.
__len__: len(x)
Returns the length or number of elements in the array.
clear()
Sets every element to
None . All of the elements in the array will be set to None .clear(value)
Clears the array by setting every element to
None .
__getitem__: v = x[index]
Returns the value stored in an element of the array.
__setitem__: x[index] = value
Stores a new value into an element of the array. The contents of the array element at position
index is changed to value .
|