I have a list as following:
l = {{"A", "b", "c", "d"}, {"A", "g", "x"}, {"b", "q", "r",
"A"}, {"f", "t"}, {"A", "z"}}
I want to count the Length of those elements that they have "A"
.
I have done as,
Map[Length, Table[Select[l[[i]], UpperCaseQ], {i, Length[l]}]]
this makes a table of those elements that have A and calculates the length, but what I am looking for is to have an outcome like:
{4,3,4,2}
namely there is A
in element with Length 4, 3, 4 and 2. How shall I do this?