Array or list

Report a typo

For the statements below, choose the datatype that they describe. It can be either a Python list or a NumPy array.

Tip: Review the NumPy arrays vs. Python lists section closely. Also, remember what the object datatype represents.

Choose one option for each row
ListArray
More memory-efficient
Optimized specifically for computations
Can be either homogenous or heterogenous
Slower than the other
Can only contain the elements of the same type
___

Create a free account to access the full topic