• + 0 comments

    Maybe merge the last 2 for loops into 1?

    for _ in range(int(input())):
    	print(N.count(input()))