Human: Python code to length of array for loop. Assistant: 
Here is a Python code to length of array for loop

import numpy as np

def len_array(array):
    """Return the length of the array."""
    return len(array)

# Enter the array
a = np.array([1, 2, 3, 4, 5, 6, 7, 8, 9, 10])

# Calling the function
print((len_array(a)))

#Example Output
# 10

#Remember to inspect code for bugs.