Answers for "python get array length"

12

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
Posted by: Guest on March-05-2020
0

python get array length

#new array in range 1 -> 10;
ar = [i for i in range(1,10)]
print(len(ar))
# OR
print(len([1,2,3]))
Posted by: Guest on May-27-2021

Python Answers by Framework

Browse Popular Code Answers by Language