You are viewing a single comment's thread. Return to all comments →
My solution:
str_seq = [input() for s in range(int(input()))] qry_seq = [input() for q in range(int(input()))] print(*(sum(q == s for s in str_seq) for q in qry_seq), sep='\n')
I like my third line.
Sparse Arrays
You are viewing a single comment's thread. Return to all comments →
My solution:
I like my third line.