As we noticed in Section 1.2.2: Line joining, Python allows a line break when some opening brace or parenthesis is not closed. This allows a convenient syntax for array creation, which makes it more pleasing to the human eye:
# the identity matrix in 2D Id = array([[1., 0.], [0., 1.]]) # Python allows this: Id = array([[1., 0.], [0., 1.]]) # which is more readable
So far, you saw a lot of differences in the definition and use between arrays and lists. Accessing array elements, in contrast, seems quite similar to the way list elements are accessed. But especially the use of multiple indexes and the resulting objects from the slicing operations require that we look at these issues in more detail.