python for length of array code example
Example 1: how to loop the length of an array pytoh
array = range(10)
for i in range(len(array)):
print(array[i])
Example 2: python get array length
# To get the length of a Python array, use 'len()'
a = arr.array(‘d’, [1.1, 2.1, 3.1])
len(a) # Output: 3