I am trying to find the mode of an array then count how many times that number appears in the array. However the way the problem I am trying to solve is set up has nested arrays so the [1] index in each array (the string) is irrelevant. How do I run this code to only apply to the [0] index of all the nested arrays?
from statistics import mode
arr = [[1,'cat'][1,'dog'][2,'fish']]
modeNum = mode(arr)
print(arr.count(modeNum))