You are viewing a single comment's thread. Return to all comments →
Pythonic approach. Any modification is welcome.
N = [] Q = [] for _ in range(int(input())): N.append(input()) for _ in range(int(input())): Q.append(input()) for i in Q: print (N.count(i))
Seems like cookies are disabled on this browser, please enable them to open this website
Sparse Arrays
You are viewing a single comment's thread. Return to all comments →
Pythonic approach. Any modification is welcome.