Answers for "count array types python"

2

python how to count items in array

myArray = [1, 2, 3];
print(len(myArray));
#output
3
Posted by: Guest on May-08-2020
0

count how much a number is in an array python

# Our array
arr = [82, 49, 82, 82, 41, 82, 15, 63, 38, 25]

# let's print the number of 82 in our array/list
print(arr.count(82))

# it will print : 4
Posted by: Guest on September-04-2021

Python Answers by Framework

Browse Popular Code Answers by Language