Q:

How to count number of strings with digits in list of lists?

list = [['hi0', 'myname23'], ['billy', 'bo3b']]
#should print [2, 1]

I have tried to find solutions but the len() and .isalpha() method is what I think I should use. Any suggestions?

A:

You have a sub-problem which is how to determine whether a string contains any digits. For that you can try:
>>> s = 'myname23'
>>> any(c.isdigit() for c in s)
True

Now you want to count the number of elements of your list for which this condition is true; you can try something like this:
>>> l = ['hi0', 'myname23', 'billy', 'bo3b']
>>> sum(1 for s in l if any(c.isdigit() for c in s))
3

